Ultimately what I want to do is access a member
foo.Dongs[i];
Where Dongs is essentially a "view" in to the Bars array and only
accesses types of type Dong.
It seems one can't do both an override on a name("Dongs") and an
index on the overridden name(`[i]`)?
It is not appropriate to use fo
I have some class like
class bar { }
class foo : bar
{
bar[] stuff;
}
and have another class
class dong : bar
{
int x;
}
Now sometimes stuff will contain dong's, but I cannot access its
members it without a cast.
fooo.stuff[0].x // invalid because bar doesn't contain x;
Hence,
((c
On Thursday, 14 November 2013 at 21:20:57 UTC, Oleg B wrote:
[code]
import std.stdio;
interface A { void funcA(); }
class B { final void funcA() { writeln( "B.funcA()" ); } }
class C: B, A { }
void main()
{
auto c = new C;
c.funcA();
}
[code/]
$ dmd -run interface.d
interface.d(6): Er
On Friday, 1 November 2013 at 08:59:36 UTC, Namespace wrote:
On Friday, 1 November 2013 at 05:49:04 UTC, Stretto wrote:
On Thursday, 31 October 2013 at 22:03:18 UTC, Namespace wrote:
The 'it' property is only some 'singleton' approach.
You can write:
void f
On Thursday, 31 October 2013 at 22:03:18 UTC, Namespace wrote:
The 'it' property is only some 'singleton' approach.
You can write:
void foo() {
auto buffer = Mallocator.allocate(42);
/// ... many code
}
And at the end of the scope buffer is cleared because
Mallocator's destructor call
Hi, I'm new to D and stumbled on the new allocators thread. In
the help there is code like
auto buffer = Mallocator.it.allocate(1024 * 1024 * 4);
scope(exit) Mallocator.it.deallocate(buffer);
which seems redundant and error prone.
Would it not be possible for allocate to automatically