Template type deduction
Phil Lavoie
maidenphil at hotmail.com
Sun Jan 20 06:59:29 PST 2013
Imagine you have something like this:
struct MyParamType( T1, T2 ) { ... }
and then a compound:
struct MyCoumpound( T ) if( isMyParamType!T ) { ... }
template isMyParamType( T ) {
enum isMyParamType = ... //Complete this
}
Is it possible to deduce that T is a parameterized struct using
isExpressions:
enum isMyParamType = is( T U: MyParamType!U ); //Works for 1
parameter, but what do you do when you have plenty?
Thanks!
Phil
More information about the Digitalmars-d-learn
mailing list