Reference counted containers prototype

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Dec 27 07:50:42 PST 2011


On 12/27/11 9:34 AM, Peter Alexander wrote:
> I don't believe this will work in general when the template parameter
> passed in requires name look-up in the local scope.
>
>
> struct Foo
> {
> int bar(alias f)() { return f(); }
> }
>
> void main()
> {
> static int fun() { return 1; }
>
> RefCounted!Foo foo;
> writeln(foo.bar!fun()); // "fun" isn't in scope when mixed in.
> }

That is a problem.

Andrei


More information about the Digitalmars-d mailing list