http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26205
Paolo Carlini changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|gcc-bugs at g
--- Comment #3 from jeffp at doomsday dot org 2006-02-15 19:55 ---
The casting work-around doesn't compile under GCC. It requires that the
template parameter be a constant-expression (which is true), which results in
the following error:
error: a casts to a type other than an integral
--- Comment #2 from bangerth at dealii dot org 2006-02-15 19:37 ---
icc gives essentially the same error as that one mentioned by Andrew for
Comeau (not surprisingly). As a workaround, you can always use an explicit
cast:
Test t2;
I believe the code is ok anyway, see 4.11/1.
W.
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-02-10 01:19 ---
Comeau gives the following error:
"ComeauTest.c", line 19: error: argument of type "int" is incompatible with
template parameter of type "int Simple::*"
Test t2; // error, but should not