cxxheaderparser icon indicating copy to clipboard operation
cxxheaderparser copied to clipboard

[PARSE BUG]: using enum

Open dyitzchaki-roku opened this issue 2 years ago • 0 comments

Problem description

C++20 added the ability to introduce enumerations to current scope with a using enum declaration, see https://eel.is/c++draft/enum.udecl Trying to parse it results in

:3: parse error evaluating 'enum': unexpected 'enum', expected 'NAME' or 'DBL_COLON' or 'namespace' or 'typename'

C++ code that can't be parsed correctly (please double-check that https://robotpy.github.io/cxxheaderparser/ has the same error)

enum class fruit { orange, apple };
struct S {
  using enum fruit;             // OK, introduces orange and apple into S
};

dyitzchaki-roku avatar Dec 27 '23 10:12 dyitzchaki-roku