When investigating the recent changes (240e3a2) in P2996, I found that such ill-formedness can be reproduced in C++20 (patched by P2564R3) without actually consteval-only types, see the test cases in llvm/llvm-project#134623.
The crux is that in C++20 we can write iterators with (possibly partially) consteval-only operations, which triggers the same errors with the current implementation strategy of libc++. And we can't just dispatch such cases with is_consteval_only_type
.
Still, is_consteval_only_type
is perhaps somehow useful, but unfortunately not so in sort
.