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

Bug#431045: Question about validity of wfmath template code



After analyzing a build failure of wfmath with gcc-4.2, I condensed the issue 
it was having to the following test case:

template <class T, class U = int> class A { public: T x1; U x2; };
template <template<class> class container_with_x1>
int f(const container_with_x1<int>& y) {
  return y.x1;
}
int g() {
  A<int> y;
  return f(y);
}

This code compiles with g++-4.1, but fails with g++-4.2 and the snapshot of 
g++-4.3 currently in Debian's gcc-snapshot package.  My question is: is this 
valid code or not?
-- 
Daniel Schepler



Reply to: