gcc/libstdc++-v3/include/debug
Jonathan Wakely 085c2f8f0e 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.
2021-08-18 14:26:38 +01:00
..
array
assertions.h
bitset
debug.h
deque libstdc++: Fix CTAD for debug sequence containers 2021-08-18 14:26:38 +01:00
formatter.h
forward_list libstdc++: Fix CTAD for debug sequence containers 2021-08-18 14:26:38 +01:00
functions.h
helper_functions.h
list libstdc++: Fix CTAD for debug sequence containers 2021-08-18 14:26:38 +01:00
macros.h
map
map.h
multimap.h
multiset.h
safe_base.h
safe_container.h libstdc++: [_GLIBCXX_DEBUG] Avoid allocator operator== when always equal 2021-08-09 20:44:58 +02:00
safe_iterator.h libstdc++: Add [[nodiscard]] to sequence containers 2021-08-04 12:54:29 +01:00
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 libstdc++: Fix CTAD for debug sequence containers 2021-08-18 14:26:38 +01:00