085c2f8f0e
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. |
||
---|---|---|
.. | ||
array | ||
assertions.h | ||
bitset | ||
debug.h | ||
deque | ||
formatter.h | ||
forward_list | ||
functions.h | ||
helper_functions.h | ||
list | ||
macros.h | ||
map | ||
map.h | ||
multimap.h | ||
multiset.h | ||
safe_base.h | ||
safe_container.h | ||
safe_iterator.h | ||
safe_iterator.tcc | ||
safe_local_iterator.h | ||
safe_local_iterator.tcc | ||
safe_sequence.h | ||
safe_sequence.tcc | ||
safe_unordered_base.h | ||
safe_unordered_container.h | ||
safe_unordered_container.tcc | ||
set | ||
set.h | ||
stl_iterator.h | ||
string | ||
unordered_map | ||
unordered_set | ||
vector |