
1 Mar
2005
1 Mar
'05
8:30 p.m.
Jonathan Wakely wrote:
This is the minimum that fails:
template<typename T, T N> struct int_ { static const T value = N; typedef int_< T, static_cast<T>(value+1) > next; };
GCC compiles this if you use "n" in the integral constant expression, rather than "value"
typedef int_< T, static_cast<T>(N+1) > next;
I'll file a GCC PR
Giovanni has reported the bug already, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20220 It has been fixed recently. Regards, m