How about a special null template parameter?

Jack Applegame via Digitalmars-d digitalmars-d at puremagic.com
Fri Aug 19 12:13:10 PDT 2016


On Friday, 19 August 2016 at 18:25:06 UTC, Engine Machine wrote:
> It replaces the current method of having to define a 
> non-templated class and a templated class.
>
> e.g.,
>
> class Type
> {
>    int x;
> }
>
> class Type(T) : Type
> {
>    static if (T is Dog)
>       int y;
> }
What are you talking about? This code doesn't compile. Because 
you can't define a class and a template with the same name.


More information about the Digitalmars-d mailing list