Skip to content

<regex>: Constants in std​::​regex_constants are not constexpr variables #4100

Description

Describe the bug

The Standard specified that constants in std::regex_constants to be constexpr variables ([re.const]).

However, MSVC STL just implements them as enumerators of unscoped enumerations, which are not variables.

It seems that they have never been specified be to non-object. In TR1 (WG21-N1836) they were static const variables.

Command-line test case

Godbolt link

Additional context

libc++ is similarly buggy (llvm/llvm-project#69420).

Also tracked by VSO-498998 / AB#498998 .

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregexmeow is a substring of homeowner

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions