------- Additional Comments From bangerth at dealii dot org 2005-09-15 17:56 ------- This is what I come up with: ------------------- template <int> struct X {}; template <typename T> struct length { static const int value = 2; }; template <typename T> void foo () { sizeof(X<length<T>::value>); } template void foo<int>(); ----------------------------- g/x> /home/bangerth/bin/gcc-3.4*-pre/bin/c++ -c x.cc g/x> /home/bangerth/bin/gcc-4.0*-pre/bin/c++ -c x.cc x.cc: In function ‘void foo() [with T = int]’: x.cc:11: instantiated from here x.cc:8: error: ‘length<int>::value’ is not a valid template argument for type ‘int’ because it is a non-constant expression g/x> /home/bangerth/bin/gcc-4.1*-pre/bin/c++ -c x.cc x.cc: In function ‘void foo() [with T = int]’: x.cc:11: instantiated from here x.cc:8: error: ‘length<int>::value’ is not a valid template argument for type ‘int’ because it is a non-constant expression W.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23896 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]