This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66350] typename should be forbidden in inhering constructors
- From: "rs2740 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 05 Jun 2015 04:35:03 +0000
- Subject: [Bug c++/66350] typename should be forbidden in inhering constructors
- Auto-submitted: auto-generated
- References: <bug-66350-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66350
TC <rs2740 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rs2740 at gmail dot com
--- Comment #4 from TC <rs2740 at gmail dot com> ---
(In reply to Martin Sebor from comment #1)
> I don't think gcc is incorrect in accepting the code either in C++ 98 mode
> as an extension, or in C++ 11 mode. In the latter mode, accepting it is in
> keeping with the resolution of DR 147. Naming the constructor (Clang
> accepts the test case above in C++ 11 mode). That is, when 'A<T>::A'
> nominates class template A the name is instead taken to name the ctor of A.
The point is that since 'A<T>::A; names the constructor, it isn't a type, and
so using 'typename' shouldn't be allowed.