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++/50400] compiler accepts invalid &X::Impl::Impl::Impl::.....::foo


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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-09-15 09:34:52 UTC ---
EDG accepts it too, are you suggesting MSVC is right and all the others wrong?
That would be a first ;)

See http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#318

Because the constructor Impl::Impl is not an acceptable lookup result in the
expression X::Impl::Impl::foo the second "Impl" names the class itself, and so
the code is valid and G++ is correct


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