On 17/08/16 07:41 +0300, Ville Voutilainen wrote:
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: Likewise.
I found the "Likewise" a bit confusing here. I realise it means "New"
but my first thought was it meant you were adding __nonesuch to that
test file. "New" for the test would be unambiguous :-)
diff --git a/libstdc++-v3/testsuite/20_util/pair/traits.cc
b/libstdc++-v3/testsuite/20_util/pair/traits.cc
new file mode 100644
index 0000000..0989cf1
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/pair/traits.cc
@@ -0,0 +1,77 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++11" }
This patch predates my testsuite changes, so this should now be
{ dg-do compile { target c++11 } }
Otherwise OK for trunk, thanks.