]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Enable assertions in constexpr string_view members [PR 71960]
authorJonathan Wakely <jwakely@redhat.com>
Wed, 26 Aug 2020 13:47:51 +0000 (14:47 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 26 Aug 2020 13:50:16 +0000 (14:50 +0100)
commit42fb390082b59c0b5af6a9f1e5a2e608ccb8e193
tree4f6ea4c4737c68f4feebf9a08454f5673f9ca340
parent9def04578cca8a0850e835eb095d9ff60097f691
libstdc++: Enable assertions in constexpr string_view members [PR 71960]

Since GCC 6.1 there is no reason we can't just use __glibcxx_assert in
constexpr functions in string_view. As long as the condition is true,
there will be no call to std::__replacement_assert that would make the
function ineligible for constant evaluation.

PR libstdc++/71960
* include/experimental/string_view (basic_string_view):
Enable debug assertions.
* include/std/string_view (basic_string_view):
Likewise.

(cherry picked from commit 3eefb302d2bd8502cb3d8fe44e672b11092ccaf6)
libstdc++-v3/include/experimental/string_view
libstdc++-v3/include/std/string_view