[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#157292: g++: template function default arguments are not handled



Package: g++
Version: 2:2.95.4-14
Severity: normal

g++ doesnt handle specifying a default argument to a specialized
template function which is done like

template <int i>
void test(int j = 0);

template <>
void test<1>(int j);

calling test<1>() should work, but instead g++ complains there is no
matching template function.

Handled correctly by gcc-3.0.

Richard.


-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux mickey 2.4.19 #1 Sat Aug 3 13:55:48 CEST 2002 i686
Locale: LANG=en_IE@euro, LC_CTYPE=

Versions of packages g++ depends on:
ii  cpp                          2:2.95.4-14 The GNU C preprocessor.
ii  g++-2.95                     1:2.95.4-7  The GNU C++ compiler.
ii  gcc-2.95                     1:2.95.4-7  The GNU C compiler.




Reply to: