Bug#431045: More self-contained test case
Here's another variant of the test case not depending on the standard library:
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);
}
I guess on further reflection it's not quite clear whether this should work.
However, it does work with g++-4.1 but not with g++-4.2 or gcc-snapshot.
--
Daniel Schepler
Reply to: