[Bug c++/38030] [4.2/4.3/4.4 Regression] name-lookup for non-dependent name in template function is wrong
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Nov 6 12:09:00 GMT 2008
------- Comment #2 from rguenth at gcc dot gnu dot org 2008-11-06 12:08 -------
Even the following fails
extern "C" void abort ();
struct B_ { };
struct D_ : public B_ { };
D_ d_;
void f_ (B_ &) { }
template < class T >
void g_ ()
{
return f_ (d_);
}
int main ()
{
g_<int> ();
return 0;
}
void f_ (D_ &) { abort (); }
where f_ (D_ &) must not be even in the 2nd stage name-lookup overload set.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38030
More information about the Gcc-bugs
mailing list