On alias a = b

KennyTM~ kennytm at gmail.com
Sat Mar 19 14:28:07 PDT 2011


On Mar 20, 11 05:14, Nick Sabalausky wrote:
> "Andrei Alexandrescu"<SeeWebsiteForEmail at erdani.org>  wrote in message
> news:im0g0n$1mal$1 at digitalmars.com...
>> On 3/18/11 3:28 PM, so wrote:
>>> alias a(T) = b(T, known_type);
>>>
>>> Would it be an overkill?
>>
>> It's part of the evil plan.
>>
>
> What about stuff like this?:
>
>      template foo() {}
>      template foo(string str) {}
>      template foo(int i) {}
>
>      alias foo bar;
>
>      // use bar!(), bar!("str") and bar!(7)
>
> Currently that doesn't work (though I forget exactly how it fails). I've
> been starting to find that to be more and more of a problem. I don't
> rememebr if it works or not when foo is series of non-templated function
> overloads. If not, it should, IMO.
>

Huh? It *does* work. See http://ideone.com/moPhm.

> Or maybe that would be solved (at least for templates) under the proposed
> evil plan with something like this?:
>
>      alias a(T...) = b!(T);
>
>
>



More information about the Digitalmars-d mailing list