std::regex_constants
should be allowed to be enumeratorsSection: 28.6.4 [re.const] Status: New Submitter: Jiang An Opened: 2023-10-18 Last modified: 2024-02-22
Priority: 3
View all other issues in [re.const].
View all issues with New status.
Discussion:
Currently, MSVC STL and libc++ implement constants in std::regex_constants
as
enumerators of unscoped enumerations, while the standard specify them to be constexpr
variables.
syntax_option_type
,
match_flag_type
, or error_type
) if the corresponding type is an enumeration.
Notes: since C++20, we can even make the enumeration types scoped and expose the enumerators to the
namespace by using-declaration or using-enum-declaration. P0439R0 might be related,
since it changed former enumerators to constexpr
variables.
[2024-02-22; Reflector poll]
Set priority to 3 after reflector poll in October 2023.
[Jonathan commented]
"Why only change the regex_constants
bitmask constants,
and not those for ctype_base::mask
,
ios_base::fmtflags
, ios_base::iostate
,
and ios_base::openmode
?"
Proposed resolution: