This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]