cf876562c5
Implement this C++23 feature. Because construction from a null pointer is undefined, we can implement it for C++11 and up, turning undefined behaviour into a compilation error. libstdc++-v3/ChangeLog: * include/bits/basic_string.h (basic_string(nullptr_t)): Define as deleted. (operator=(nullptr_t)): Likewise. * include/bits/cow_string.h (basic_string(nullptr_t)): Likewise. (operator=(nullptr_t)): Likewise. * include/std/string_view (basic_string_view(nullptr_t)): Likewise. * testsuite/21_strings/basic_string/cons/char/nullptr.cc: New test. * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: Change dg-warning to dg-error. * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc: Likewise. |
||
---|---|---|
.. | ||
17_intro | ||
18_support | ||
19_diagnostics | ||
20_util | ||
21_strings | ||
22_locale | ||
23_containers | ||
24_iterators | ||
25_algorithms | ||
26_numerics | ||
27_io | ||
28_regex | ||
29_atomics | ||
30_threads | ||
abi | ||
backward | ||
config | ||
data | ||
decimal | ||
experimental | ||
ext | ||
lib | ||
libstdc++-abi | ||
libstdc++-dg | ||
libstdc++-prettyprinters | ||
libstdc++-xmethods | ||
performance | ||
special_functions | ||
std | ||
tr1 | ||
tr2 | ||
util | ||
Makefile.am | ||
Makefile.in |