This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/57942] g++-4.8.1 tries to instantiate wrong constructor (C++11)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57942

Richard Smith <richard-gccbugzilla at metafoo dot co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |richard-gccbugzilla@metafoo
                   |                            |.co.uk

--- Comment #1 from Richard Smith <richard-gccbugzilla at metafoo dot co.uk> ---
Reduced to:

template<typename T> struct S { typename T::error type; };
struct X {};
void f(S<int> *);
void f(...);
void g() { f((X*)0); }

It looks like, when considering a conversion from A* to B*, where A is a class
type, gcc attempts to complete B. There seems to be no obvious justification
for this (it doesn't help in determining whether B is a base class of A, which
seems like the most likely explanation for this behavior).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]