https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124396
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
For <string_view>, that is because std::__sv_check (used by
std::basic_string_view::{copy,substr}) and std::basic_string_view::at calls
__throw_out_of_range_fmt.
And those need to throw at constexpr time std::out_of_range objects.
And std::out_of_range is required by the standard to have constructor from
std::string.
But sure, if we have some subset of <string> that satisfies the uses in <meta>
and <stdexcept> and doesn't provide everything else, perhaps it could be
optimized.