public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51145] New: [C++11][DR1131] Alias template in elaborated-type-specifier accepted
@ 2011-11-15 19:50 daniel.kruegler at googlemail dot com
  2011-11-15 21:01 ` [Bug c++/51145] " jason at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2011-11-15 19:50 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51145
           Summary: [C++11][DR1131] Alias template in
                    elaborated-type-specifier accepted
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: daniel.kruegler@googlemail.com
                CC: jason@redhat.com


gcc 4.7.0 20111112 (experimental) in C++11 mode accepts the following code:

//---
struct A {};

template<class>
using X = A;

struct X<int>* px;

template<int>
using Y = A;

struct Y<0>* py;
//---

According to 7.1.6.3 [dcl.type.elab] p2 both elaborated-type-specifier usages
in the definition of px and py should be rejected:

"If the identifier resolves to a typedef-name or the simple-template-id
resolves to an alias template specialization, the elaborated-type-specifier is
ill-formed."

This sentence was added to honor NB comment US 41 via:

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-11-23  8:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-15 19:50 [Bug c++/51145] New: [C++11][DR1131] Alias template in elaborated-type-specifier accepted daniel.kruegler at googlemail dot com
2011-11-15 21:01 ` [Bug c++/51145] " jason at gcc dot gnu.org
2011-11-17 21:37 ` [Bug c++/51145] [C++11][DR 1131] " dodji at gcc dot gnu.org
2011-11-18  0:07 ` dodji at gcc dot gnu.org
2011-11-18 13:25 ` jason at gcc dot gnu.org
2011-11-18 19:35 ` dodji at gcc dot gnu.org
2011-11-23  9:22 ` dodji at gcc dot gnu.org
2011-11-23  9:27 ` dodji at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).