possible "solution" for ufcs

Steven Schveighoffer schveiguy at yahoo.com
Mon Jun 6 15:44:26 PDT 2011


On Mon, 06 Jun 2011 17:18:27 -0400, Timon Gehr <timon.gehr at gmx.ch> wrote:

> Steven Schveighoffer wrote:
>> Yes, but I also think if we can make UFCS optional, we give some power
>> back to the author of the struct/class.  He can choose not to  
>> participate
>> in ufcs, and then he can control the API to his type.
>>
>> Plus, this can be a good interim step!  It works right now!
>>
>> -Steve
>
> Just realized that actually it doesn't. It does not work across module
> boundaries... =/

:(

Hm... this makes sense, the template is instantiated at the context level
of the defining module, not the calling module.

It can however work for something like std.range calling std.range or
std.algorithm functions.  Just not in the general sense.

-Steve


More information about the Digitalmars-d mailing list