Hi, GCC 4.3 (4.3.0 20080201 (experimental) (GCC)) rejects the code with the following error:
g++43 -W -Wall -o tt tt.cxx tt.cxx:28: warning: unused parameter 'argv' tt.cxx: In member function 'int Test<T>::set(T) [with T = char]': tt.cxx:31: instantiated from here tt.cxx:22: error: 'static void Test<T>::Put(T&, const T&) [with T = char]' cannot appear in a constant-expression But Comeau's test drive accepts it with or without Test:: prefix. -- Summary: Problem with non-type template parameter and name lookup in template. Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: v dot haisman at sh dot cvut dot cz GCC build triplet: i386-portbld-freebsd6.3 GCC host triplet: i386-portbld-freebsd6.3 GCC target triplet: i386-portbld-freebsd6.3 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35167