This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
default int paramters ignored?
- From: nbecker at hns dot com (Neal D. Becker)
- To: gcc at gcc dot gnu dot org
- Date: 10 Jul 2002 16:30:52 -0400
- Subject: default int paramters ignored?
It appears that gcc-3.1 will accept default integer template
parameters, but they seem to be ignored. Is this correct behaviour?
template<int shift=1>
class Rnd {
inline int Compute (int x) {
return x >> shift;
}
};
main() {
Rnd<1> a; <<== OK
Rnd b; << parse error
}