On 08/11/20 15:06 +0100, François Dumont via Libstdc++ wrote:
Now that __glibcxx_assert is constexpr compatible we can do the same
for the _GLIBCXX_DEBUG equivalent.
I had also try to do the same on my own so this patch contains the
string_view tests I had written when doing so.
I plan to activate some _GLIBCXX_DEBUG checks when _GLIBCXX_ASSERTIONS
is defined but only the contant time checks. Is it ok to run checks
like __check_partitioned_lower in constexpr ?
Hmm, I don't *think* it's possible to detect the additional calls to
the comparison function during constant evaluation. So I think the
only concern is the extra work the compiler has to do, i.e. the extra
time it takes to compile.
The constant-time checks should be OK though.
   libstdc++: Make _GLIBCXX_DEBUG checks constexpr compatible
[snip]
Ok to commit ?
Yes, thanks.