This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [C++] regression between 2.95.2 and current
- To: Theodore dot Papadopoulo at sophia dot inria dot fr
- Subject: Re: [C++] regression between 2.95.2 and current
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Sun, 23 Jan 2000 11:37:36 -0800
- Cc: bug-gcc at gnu dot org, Jose dot Gomes at sophia dot inria dot fr
- Organization: CodeSourcery, LLC
- References: <200001181259.NAA20532@mururoa.inria.fr>
#include <iostream>
struct A {
A() { }
template <class T>
A& operator<<(const T& t) { cerr << t; return *this; }
};
void
f() {
A mcout;
mcout << endl;
}
G++ is correct to reject this program. It involves creating a
cv-qualified function type, and that causes template deduction to
fail.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com