diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-08-17 18:19:27 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-08-18 14:26:38 +0100 |
commit | 085c2f8f0e13d7c1515ce86755a52a31faf0cf47 (patch) | |
tree | ed866e000644f96813f3a7c485d432fb8a7af823 /libiberty/simple-object-mach-o.c | |
parent | c883d1dcdea8820015ee7ffdc68c03cf3b8180bf (diff) | |
download | gcc-085c2f8f0e13d7c1515ce86755a52a31faf0cf47.zip gcc-085c2f8f0e13d7c1515ce86755a52a31faf0cf47.tar.gz gcc-085c2f8f0e13d7c1515ce86755a52a31faf0cf47.tar.bz2 |
libstdc++: Fix CTAD for debug sequence containers
This fixes some 23_containers/*/cons/deduction.cc failures seen with
-std=c++17/-D_GLIBCXX_DEBUG, caused by non-immediate errors when
substituting template arguments into an incorrect specialization of the
std::__cxx1998 base class. This happens because the size_type member of
the debug container is _Base_type::size_type, so is non-deducible, and
the deduced types get substituted into _Base_type, triggering the
static_assert that checks the allocator's value_type matches the
container's.
The solution is to make the C(size_type, const T&, const Alloc&)
constructors of the debug sequence containers non-deducible. In order to
make CTAD work again deduction guides that use std::size_t for the first
argument are added.
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
* include/debug/deque (deque(size_type, const T&, const A&)):
Prevent class template argument deduction and replace with a
deduction guide.
* include/debug/forward_list (forward_list(size_type, const T&, const A&)):
Likewise.
* include/debug/list (list(size_type, const T&, const A&)):
Likewise.
* include/debug/vector (vector(size_type, const T&, const A&)):
Likewise.
Diffstat (limited to 'libiberty/simple-object-mach-o.c')
0 files changed, 0 insertions, 0 deletions