Help!

Manu turkeyman at gmail.com
Mon Nov 26 08:49:39 PST 2012


On 26 November 2012 18:40, Adam D. Ruppe <destructionator at gmail.com> wrote:

> On Monday, 26 November 2012 at 16:37:08 UTC, Manu wrote:
>
>> Why does it fail on a basic type (int), but not a user defined type (S)?
>>
>
> S is a D symbol name, int isn't...
>
>
>  How can I fix the template declaration to not error in that case?
>>
>
> Try using only the (T,A) version, removing the alias version.
>
> You might have to pass typeof(var) to it in some cases, but if you pass it
> typenames it should just work.
>

The template works on symbol aliases, so I can't do that. It needs to
gracefully handle being given an int though somehow.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20121126/a21397c5/attachment-0001.html>


More information about the Digitalmars-d mailing list