On Thursday, 20 February 2014 at 18:55:06 UTC, Frustrated wrote:
This should work. Just have to add the overrides and call the
base function(e.g., "override" insert and then call x's insert).
This at least gets the job done... I wonder if there is a better
way?
If you want a.Add() (insert() in
On Wednesday, 19 February 2014 at 21:50:43 UTC, Meta wrote:
On Wednesday, 19 February 2014 at 19:44:12 UTC, Meta wrote:
On Wednesday, 19 February 2014 at 19:10:44 UTC, Frustrated
wrote:
Are there container templates that one can mixin to classes
that
give them container behavior?
e.g
On Wednesday, 19 February 2014 at 19:44:12 UTC, Meta wrote:
On Wednesday, 19 February 2014 at 19:10:44 UTC, Frustrated
wrote:
Are there container templates that one can mixin to classes
that
give them container behavior?
e.g.,
instead of
class A
{
Array!int x;
}
I want
class A
On Wednesday, 19 February 2014 at 19:44:12 UTC, Meta wrote:
On Wednesday, 19 February 2014 at 19:10:44 UTC, Frustrated
wrote:
Are there container templates that one can mixin to classes
that
give them container behavior?
e.g.,
instead of
class A
{
Array!int x;
}
I want
class A
On Wednesday, 19 February 2014 at 19:44:12 UTC, Meta wrote:
On Wednesday, 19 February 2014 at 19:10:44 UTC, Frustrated
wrote:
Are there container templates that one can mixin to classes
that
give them container behavior?
e.g.,
instead of
class A
{
Array!int x;
}
I want
class A
On Wednesday, 19 February 2014 at 19:10:44 UTC, Frustrated wrote:
Are there container templates that one can mixin to classes that
give them container behavior?
e.g.,
instead of
class A
{
Array!int x;
}
I want
class A
{
mixin Array!int;
}
so that I can do something like a.Add(3
Are there container templates that one can mixin to classes that
give them container behavior?
e.g.,
instead of
class A
{
Array!int x;
}
I want
class A
{
mixin Array!int;
}
so that I can do something like a.Add(3) instead of a.x.Add(3).
In fact, I do want the first case because I