gcc/libstdc++-v3/testsuite/20_util/pair
Jonathan Wakely 302343d8dd libstdc++: Fix ambiguous std::pair constructors [PR101124]
The deprecated non-standard std::pair constructors that allow
constructing std::pair<move-only-type, pointer-type> from an rvalue and
a literal zero where not sufficiently constrained. They were viable when
constructing std::pair<copyable-type, pointer-type>, and that case
should work fine using the standard constructors.

Replace the constraints on the non-standard constructors so they are
only viable in cases that should actually be ill-formed according to the
standard.

Also rename __null_ptr_constant to __zero_as_null_pointer_constant so it
matches the name of the -Wzero-as-null-pointer-constant warning. Also
make the text of the deprecated warning describe the problem in more
detail.

libstdc++-v3/ChangeLog:

	PR libstdc++/101124
	* include/bits/stl_pair.h (pair): Adjust constraints on
	deprecated constructors accepting literal zero as null pointer
	constant. Improve wording of deprecated attribute.
	* testsuite/20_util/pair/cons/99957.cc: Check that deprecated
	constructors do not cause ambiguities for copyable types.
2022-01-18 16:31:03 +00:00
..
astuple
comparison_operators
cons
make_pair
requirements
1.cc
2.cc
3.cc
4.cc
40925.cc
44487.cc
70437.cc
79141.cc
86751.cc
87822.cc
constexpr_assign.cc
constexpr_get.cc
constexpr_swap.cc
moveable.cc
noexcept_move_assign.cc
noexcept_swap.cc
noncopyable.cc
piecewise2.cc
piecewise.cc
ref_assign.cc
swap_cxx17.cc
swap.cc
traits.cc