
31 Mar
2006
31 Mar
'06
5:13 p.m.
"Tobias Schwinger" wrote
// IS_TYPE((int))::value is true // IS_TYPE((1))::value is false
Does anyone know how to implement this without a typeof operator?
I havent got a solution but one avenue thats seems to be in the right field is to exploit the difference between a function call and a declaration: Sometype func_or_value( Entity_to_test); eg assume Entity_to_test is a type then func_or_value is a function, else func_or_value is a variable. Dont know if it helps though. The other slim hope is exploiting how e.g std::for_each uses its last argument, but I dont quite know how that would help if at all. regards Andy Little