public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100862] New: using enum member access fail
@ 2021-06-01 19:53 eligorkadaf at gmail dot com
  2021-06-02  9:33 ` [Bug c++/100862] " redi at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: eligorkadaf at gmail dot com @ 2021-06-01 19:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100862
           Summary: using enum member access fail
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eligorkadaf at gmail dot com
  Target Milestone: ---

The following code must compile according to C++20 standard. However, gcc fails
to compile it

enum class fruit { orange, apple };

struct Working {
    using enum fruit;
};

struct Broken {
    using enum fruit;
private:
};

int main() {
    Working::orange;
    Broken::orange;
}

Link to godbolt(I don't have gcc-11 installed): https://godbolt.org/z/srYj3sMno

Link to C++-draft clause: http://eel.is/c++draft/namespace.udecl#16

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

end of thread, other threads:[~2021-06-07 22:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 19:53 [Bug c++/100862] New: using enum member access fail eligorkadaf at gmail dot com
2021-06-02  9:33 ` [Bug c++/100862] " redi at gcc dot gnu.org
2021-06-02 12:46 ` ppalka at gcc dot gnu.org
2021-06-03 13:39 ` cvs-commit at gcc dot gnu.org
2021-06-07 22:37 ` cvs-commit at gcc dot gnu.org
2021-06-07 22:58 ` ppalka 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).