aboutsummaryrefslogtreecommitdiff
path: root/libiberty/simple-object-mach-o.c
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-08-17 18:19:27 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-08-18 14:26:38 +0100
commit085c2f8f0e13d7c1515ce86755a52a31faf0cf47 (patch)
treeed866e000644f96813f3a7c485d432fb8a7af823 /libiberty/simple-object-mach-o.c
parentc883d1dcdea8820015ee7ffdc68c03cf3b8180bf (diff)
downloadgcc-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