Limiting template functions to template instantiations of a struct

Marco Leise Marco.Leise at gmx.de
Thu Nov 7 07:46:49 PST 2013


Am Wed, 06 Nov 2013 14:22:13 +0100
schrieb "simendsjo" <simendsjo at gmail.com>:

>      template isFoo(T) {
>          static if(is(T:Foo!U, int U))
>              enum isFoo = true;
>          else
>              enum isFoo = false;
>      }

enum isFoo(T) = is(T:Foo!U, int U);

correct ?

-- 
Marco



More information about the Digitalmars-d-learn mailing list