re PR libstdc++/79141 (std::pair<int,int> p = {}; fails to compile due to ambiguous...
authorVille Voutilainen <ville.voutilainen@gmail.com>
Mon, 3 Apr 2017 16:30:58 +0000 (19:30 +0300)
committerVille Voutilainen <ville@gcc.gnu.org>
Mon, 3 Apr 2017 16:30:58 +0000 (19:30 +0300)
commitc1e2889a320a2e45eb60b6bb7c1d3d8fc0068582
tree974dd12e35bad8b7b5027c7ceb58c8960623a9fa
parent44bc146fcfa43559b27290329dd42158fa1222ad
re PR libstdc++/79141 (std::pair<int,int> p = {}; fails to compile due to ambiguous overload)

PR libstdc++/79141
* include/bits/stl_pair.h (__nonesuch_no_braces): New.
(operator=(typename conditional<
__and_<is_copy_assignable<_T1>,
is_copy_assignable<_T2>>::value,
const pair&, const __nonesuch&>::type)): Change __nonesuch
to __nonesuch_no_braces.
(operator=(typename conditional<
__not_<__and_<is_copy_assignable<_T1>,
is_copy_assignable<_T2>>>::value,
const pair&, const __nonesuch&>::type)): Likewise.
(operator=(typename conditional<
__and_<is_move_assignable<_T1>,
is_move_assignable<_T2>>::value,
pair&&, __nonesuch&&>::type)): Likewise.
* testsuite/20_util/pair/79141.cc: New.

From-SVN: r246653
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_pair.h
libstdc++-v3/testsuite/20_util/pair/79141.cc [new file with mode: 0644]