]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: port away from is_trivial in string classes
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Mon, 9 Dec 2024 00:43:27 +0000 (01:43 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 10 Dec 2024 00:50:25 +0000 (00:50 +0000)
commit00ee881811f64f261465b39abd3c9c278be584b6
treeb8037bc806ecd4e8ad7521b27b45305073869d88
parent8aaff8a1732a0421778a18cf3ace042023e25da3
libstdc++: port away from is_trivial in string classes

In preparation for the deprecation of is_trivial (P3247R2), stop using
it from std::string_view. Also, add the same detection to std::string
(described in [strings.general]/2).

libstdc++-v3/ChangeLog:

* include/bits/basic_string.h: Add a static_assert on the
char-like type.
* include/std/string_view: Port away from is_trivial.

Signed-off-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
libstdc++-v3/include/bits/basic_string.h
libstdc++-v3/include/std/string_view