aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-01-18 15:10:06 +0000
committerJonathan Wakely <jwakely@redhat.com>2022-01-18 16:31:03 +0000
commit302343d8dd30e34516f74a61ec758d80a6c4d1db (patch)
tree651b3cfb3b599910fcee4742cdb186d1aae2cac5 /gcc
parent50bc6e463b5f0696bc3cb9edd743d09b17309370 (diff)
downloadgcc-302343d8dd30e34516f74a61ec758d80a6c4d1db.zip
gcc-302343d8dd30e34516f74a61ec758d80a6c4d1db.tar.gz
gcc-302343d8dd30e34516f74a61ec758d80a6c4d1db.tar.bz2
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.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions