[Bug c++/56090] Injected-class-name treated as constructor name

2021-08-09 Thread redi at gcc dot gnu.org via Gcc-bugs
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

2021-08-07 Thread pinskia at gcc dot gnu.org via Gcc-bugs
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

2013-01-23 Thread klemensbaum at gmail dot com


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

2013-01-23 Thread pinskia at gcc dot gnu.org


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

2013-01-23 Thread pinskia at gcc dot gnu.org


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.