On 06/25/2013 12:32 PM, Timothee Cour wrote:
It is not a bug.
template Test(alias T){
static if(is(T == TI!TP, alias TI, TP)){
enum Test=true;
}
else{
enum Test=false;
}
}
struct A(T){}
void foo(T)(T a){}
void main(){
static assert(Test!(A!double));
static assert(!Test!(foo!double)); //why is Test false?
}
Because foo!double is not a type. All forms of the is-expression check
whether the first argument is a valid type.
This is blocking my pull request to make
fullyQualifiedName/GetTemplateParent/GetTemplateArguments work on
everything: right now it fails on templated functions.