re PR libstdc++/77537 (pair constructors do not properly SFINAE)
authorVille Voutilainen <ville.voutilainen@gmail.com>
Wed, 21 Sep 2016 16:48:35 +0000 (19:48 +0300)
committerVille Voutilainen <ville@gcc.gnu.org>
Wed, 21 Sep 2016 16:48:35 +0000 (19:48 +0300)
commitf524d5b34aaac95cb4b2ce7126002cd4fa9d5bae
tree1620641ceb06be29326134f342843d55e466d9e0
parentd43b4ccc3737d468df2006814abe47824129e054
re PR libstdc++/77537 (pair constructors do not properly SFINAE)

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.

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