diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2024-03-07 16:00:01 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2024-08-01 21:56:56 +0100 |
commit | 8b8e5ed6cd0f3cfe7cdf93200e47c069fd101984 (patch) | |
tree | 9dca9f7a31f54a058001e9d3269035ed0ba4c19f /gcc | |
parent | 6586b015f1211ccd6e3e89b44dcb2116347edf89 (diff) | |
download | gcc-8b8e5ed6cd0f3cfe7cdf93200e47c069fd101984.zip gcc-8b8e5ed6cd0f3cfe7cdf93200e47c069fd101984.tar.gz gcc-8b8e5ed6cd0f3cfe7cdf93200e47c069fd101984.tar.bz2 |
libstdc++: Constrain std::basic_string default constructor [PR113841]
This is needed to avoid errors outside the immediate context when
evaluating is_default_constructible_v<basic_string<C, T, A>> when A is
not default constructible.
This change is not sufficient to solve the problem because there are a
large number of member functions which have a default argument that
constructs an allocator.
libstdc++-v3/ChangeLog:
PR libstdc++/113841
* include/bits/basic_string.h (basic_string::basic_string()):
Constrain so that it's only present if the allocator is default
constructible.
* include/bits/cow_string.h (basic_string::basic_string()):
Likewise.
* testsuite/21_strings/basic_string/cons/113841.cc: New test.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions