<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/69420>69420</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [libc++] Constants in `std​::​regex_constants` are not `constexpr` variables
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc++
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          frederick-vs-ja
      </td>
    </tr>
</table>

<pre>
    The Standard specified that constants in `std::regex_constants` to be `constexpr` variables ([[re.const]](https://eel.is/c++draft/re.const)).

However, libc++ just implements them as enumerators of unscoped enumerations, which are not variables.

It seems that they have never been specified to be non-object. In TR1 ([N1836](https://wg21.link/n1836)) they were `static const` variables.

MSVC STL is similarly buggy ([Godbolt link](https://godbolt.org/z/ETxYn3o7n)).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U11vmzAU_TXm5SrImO8HHpqmbJW2PazRpD1NNlzArbEj2yTNfv0EZGk7ZRICYd-Pc889hzsne41YkXRL0l3AJz8YW3UWW7Syedkc3eaZB8K052o_IDx5rltuW3AHbGQnsQU_cA-N0c5z7R1IDSSjzrckviPxncUeX39dr0lGwRsQOActp_h6sPPpkVvJhUIHhBULmq3FcAkh6W5-WDF4f3BzXVYTViOqUDrC6oawLWHb1vLOE1Zf01hJWBkSuiP0bn1_Nic8oiXsHpQUlzx4npwHOR4UjjiP4AccgTtAPY1ouTfWgelg0q4xB2yv59JoN5c6DbIZgFsEbfzbIB86P3pwiKNb6fIDnmHgRwQ94wGBqN9TujCkjd4Y8YyND-FRw_57dKHmW1TE2S1GTj2LQiX1C2G1XoIWCtZ2J7S4roZ72awb-0D8B7xfn37cw9P-C0gHTo5ScavOIKa-P19QfDKtMMrD0u8GmH69D43tCat_E1Y_7F9_6tjk-rKZoK3itoxLHmAVZWWe0SQqkmCo0rjkNBUd51GU5yxncSfSKMrKMse4yUQgK0ZZHNGooEkS0ySkXRaVjShyzPIi5QVJKI5cqlCp4zhDCKRzE1ZZmTAaKC5QuUXzjL0JgTA2e8BWc9JGTL0jCVXSefdWxkuvFre8S0t3cH9D_w-MFJQU29UI198bjvgrnf96Ipisqv6hV_phEmFjRsLqGd7lszlYM2uGsHoZeTbIMvWfAAAA___RpTsa">