On 12/26/11 7:25 PM, Peter Alexander wrote:
Following up to this, how do I access non-function members of the held
object? e.g.

struct Foo
{
int x = 1;
}

void main()
{
RefCounted!Foo f;
writeln(f.x); // Doesn't work
}

We can easily have opDispatch look at field names. But I think it's poor design to expose bald data anyway.

Also, what about template member functions of the held object?

struct Foo
{
int get(int X)() { return X; }
}

void main()
{
RefCounted!Foo f;
writeln(f.get!123()); // Doesn't work either
}

This is a problem.


Andrei

Reply via email to