parameter type tuple or alias for std.traits templates ?

Philippe Sigaud philippe.sigaud at gmail.com
Sat Jun 23 23:25:25 PDT 2012


Le 23 juin 2012 12:53, "Jacob Carlborg" <doob at me.com> a écrit :
>
> On 2012-06-23 01:05, Timon Gehr wrote:
>
>> Yes there is, but I have argued that this is a bug in the past. With
>> DMD, the (func...) accepts built-in types, while the (alias func) does
>> not.
>
>
> Would it be possible to overload? Something like this:
>
> template Foo (T) {}
>
> template Foo (alias a) {}

I think it is. IIRC, I did something like this.

But then the trouble is with user-defined types: they are both a type and a
symbol, so they may fire both templates.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120624/3eaefed6/attachment.html>


More information about the Digitalmars-d mailing list