Function overloading concern

Walter Bright newshound at digitalmars.com
Thu Mar 9 20:47:14 PST 2006


"Sean Kelly" <sean at f4.ca> wrote in message 
news:duq74p$1aoo$1 at digitaldaemon.com...
> Carlos Santander wrote:
>>
>> Does this work?
>>
>>     import a;
>>     import b;
>>
>>     alias a.swap swap;
>>     alias b.swap swap;
>
> It does.  alias is just too darn flexible for its own good :-)

Actually, alias was specifically designed so that will work. It enables one 
to select which groups of functions one wants to overload with, rather than 
doing C++ style ADL. 





More information about the Digitalmars-d mailing list