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 A { public: T x1; U x2; }; template class container_with_x1> int f(const container_with_x1& y) { return y.x1; } int g() { A 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
Re: Question about validity of wfmath template code
On Friday 29 June 2007 17:31:17 pm Lawrence Crowl wrote: > I've sent your question to the C++ committee, as I wasn't > sure of the answer. It's been pointed out to me, after I asked this, that the example code from the second bullet under C++ for the gcc-4.2 changes document is almost identical, and the general description seems to indicate this change was intentional. -- Daniel Schepler