C++ DR/354
Magnus Fromreide
magfr@lysator.liu.se
Sun Feb 14 23:22:00 GMT 2010
Hello.
I tried to look at fixing DR/354 but ended up lost in cp/parser.c
I have the following test case:
template <int*> struct S { };
S<(int*)0> s;
and end up with the following errors
:2:9: error: a cast to a type other than an integral or enumeration type
cannot appear in a constant-expression
:2:10: error: template argument 1 is invalid
:2:13: error: invalid type in declaration before ';' token
Now my question is how I should go about allowing that (int*)0?
/MF (Have not wrapped my head around gcc/cp/parser.c yet)
More information about the Gcc
mailing list