public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102004] New: The opaque-enum-declaration whose enum-head-name contains a nest-name-specifier should be permitted in an explicit specialization
@ 2021-08-21  9:32 xmh970252187 at gmail dot com
  2021-08-21 12:58 ` [Bug c++/102004] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: xmh970252187 at gmail dot com @ 2021-08-21  9:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102004

            Bug ID: 102004
           Summary: The opaque-enum-declaration whose enum-head-name
                    contains a nest-name-specifier should be permitted in
                    an explicit specialization
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xmh970252187 at gmail dot com
  Target Milestone: ---

template<class T>
struct A{
    enum C:T;
};
template<>
enum A<int>::C:int;


This explicit specialization should be accepted by comfort implementations.
Since the standard only says that  

> If the enum-head-name of an opaque-enum-declaration contains a nested-name-specifier, the declaration shall be an explicit specialization.  

Clang accepts this example while GCC rejects it with the diagnosis
"opaque-enum-specifier must use a simple identifier". 
https://godbolt.org/z/zYG4sYbK6

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

* [Bug c++/102004] The opaque-enum-declaration whose enum-head-name contains a nest-name-specifier should be permitted in an explicit specialization
  2021-08-21  9:32 [Bug c++/102004] New: The opaque-enum-declaration whose enum-head-name contains a nest-name-specifier should be permitted in an explicit specialization xmh970252187 at gmail dot com
@ 2021-08-21 12:58 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-21 12:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102004

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=61491

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Related to PR 61491 and C++ DR 1206:
http://open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#1206

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

end of thread, other threads:[~2021-08-21 12:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-21  9:32 [Bug c++/102004] New: The opaque-enum-declaration whose enum-head-name contains a nest-name-specifier should be permitted in an explicit specialization xmh970252187 at gmail dot com
2021-08-21 12:58 ` [Bug c++/102004] " pinskia 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).