libstdc++: Implement LWG 3706 for COW strings
authorJonathan Wakely <jwakely@redhat.com>
Wed, 14 Oct 2020 10:52:26 +0000 (11:52 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 14 Oct 2020 11:51:40 +0000 (12:51 +0100)
commitdc38e255242192303ae463a913c060b426eb06c0
tree95ce8fda3e5cbdbbface62ed2bb2af66c0718975
parent4d2a56a0f7135469587feacef44cf00e08f71d09
libstdc++: Implement LWG 3706 for COW strings

The basic_string deduction guides are defined for the old ABI, but the
tests are currently disabled. This is because a single case fails when
using the old ABI, which is just because LWG 3706 isn't implemented for
the old ABI. That can be done easily, and the tests can be enabled.

libstdc++-v3/ChangeLog:

* include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
(basic_string(const _CharT*, const _Alloc&)): Constrain to
require an allocator-like type to fix CTAD ambiguity (LWG 3706).
* testsuite/21_strings/basic_string/cons/char/deduction.cc:
Remove dg-skip-if.
* testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
Likewise.
libstdc++-v3/include/bits/basic_string.h
libstdc++-v3/testsuite/21_strings/basic_string/cons/char/deduction.cc
libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc