libstdc++: Enable constexpr std::bitset for debug mode
authorJonathan Wakely <jwakely@redhat.com>
Fri, 23 Sep 2022 09:12:09 +0000 (10:12 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 23 Sep 2022 11:53:51 +0000 (12:53 +0100)
commit4ceb5bc42d9d703bac5c98b94c639ef9438aaede
treef5fcf629cfb511aff8652a031e5f53bdabfa3da7
parentffb03fa12850df3a4f53435d5f20ff122c83732a
libstdc++: Enable constexpr std::bitset for debug mode

We already disable all debug mode checks for C++11 and later, so we can
easily make everything constexpr. This fixes the FAIL results for the
new tests when using -D_GLIBCXX_DEBUG.

Also fix some other tests failing with non-default test flags.

libstdc++-v3/ChangeLog:

* include/debug/bitset (__debug::bitset): Add constexpr to all
member functions.
(operator&, operator|, operator^): Add inline and constexpr.
(operator>>, operator<<): Add inline.
* testsuite/20_util/bitset/access/constexpr.cc: Only check using
constexpr std::string for the cxx11 ABI.
* testsuite/20_util/bitset/cons/constexpr_c++23.cc: Likewise.
* testsuite/20_util/headers/bitset/synopsis.cc: Check constexpr
for C++23.
libstdc++-v3/include/debug/bitset
libstdc++-v3/testsuite/20_util/bitset/access/constexpr.cc
libstdc++-v3/testsuite/20_util/bitset/cons/constexpr_c++23.cc
libstdc++-v3/testsuite/20_util/headers/bitset/synopsis.cc