[Bug c++/56090] Injected-class-name treated as constructor name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56090 Jonathan Wakely changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #5 from Jonathan Wakely --- This was clarified by Core DR 1310 https://wg21.link/cwg1310 foo::foo names the constructor, and so can only be used to declare the constructor as a friend, or in a using-declaration for inheriting constructors.
[Bug c++/56090] Injected-class-name treated as constructor name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56090 --- Comment #4 from Andrew Pinski --- GCC, clang, ICC and MSVC all say this is not a bug and the name is a constructor name in this context.
[Bug c++/56090] Injected-class-name treated as constructor name
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56090 --- Comment #3 from Klemens 2013-01-23 22:32:47 UTC --- I would argue that in 3.4.3.1.2 the constructor is not an acceptable lookup result, since it would result in the code being invalid. Additionally, the following use of a type alias (where the constructor is clearly not an acceptable lookup result) does not compile on my g++-4.7.1: struct foo { using bar = foo::foo::foo; };
[Bug c++/56090] Injected-class-name treated as constructor name
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56090 --- Comment #2 from Andrew Pinski 2013-01-23 21:44:07 UTC --- My reading of DR 147, makes this invalid code as foo::foo names the constructor.
[Bug c++/56090] Injected-class-name treated as constructor name
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56090 --- Comment #1 from Andrew Pinski 2013-01-23 21:41:16 UTC --- This is related to bug 11764 and C++ defect report #147.