This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/77537] [6 Regression] pair constructors do not properly SFINAE
- From: "ville at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 26 Sep 2016 19:56:46 +0000
- Subject: [Bug libstdc++/77537] [6 Regression] pair constructors do not properly SFINAE
- Auto-submitted: auto-generated
- References: <bug-77537-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77537
--- Comment #9 from ville at gcc dot gnu.org ---
Author: ville
Date: Mon Sep 26 19:56:14 2016
New Revision: 240507
URL: https://gcc.gnu.org/viewcvs?rev=240507&root=gcc&view=rev
Log:
Backport from mainline
2016-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
PR libstdc++/77537
Implement LWG 2729 for pair.
* include/bits/stl_pair.h (_PCC): New.
(_ConstructiblePair, _ImplicitlyConvertiblePair):
Turn into static member functions of _PCC.
(_MoveConstructiblePair, _ImplicitlyMoveConvertiblePair): Likewise.
(_PCCP): New.
(pair(const _T1&, const _T2&)): Adjust.
(_PCCFP): New.
(pair(const pair<_U1, _U2>&)): Adjust.
(pair(_U1&&, const _T2&)): Likewise.
(pair(const _T1&, _U2&&)): Likewise.
(pair(_U1&&, _U2&&)): Likewise.
(pair(pair<_U1, _U2>&&)): Likewise.
(operator=(const pair&)): Make conditionally deleted.
(operator=(pair&&)): Make conditionally suppressed.
(operator=(const pair<_U1, _U2>&)): Constrain.
(operator=(pair<_U1, _U2>&&): Likewise.
* include/std/type_traits (__nonesuch): New.
* testsuite/20_util/pair/traits.cc: New.
Added:
branches/gcc-6-branch/libstdc++-v3/testsuite/20_util/pair/traits.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/include/bits/stl_pair.h
branches/gcc-6-branch/libstdc++-v3/include/std/type_traits