aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2010-02-07 10:29:04 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2010-02-07 10:29:04 +0000
commitf41e0f10464c060e928927c5272a360c31a48093 (patch)
treefffb40a484cc1342af56c6697b61c95e182a8f40
parent791e8c9c76380624c9257f7b7dac9707b1793ca2 (diff)
downloadgcc-f41e0f10464c060e928927c5272a360c31a48093.zip
gcc-f41e0f10464c060e928927c5272a360c31a48093.tar.gz
gcc-f41e0f10464c060e928927c5272a360c31a48093.tar.bz2
stl_pair.h (pair<>::pair(_U1&&, const _T2&), [...]): Revert to std::is_convertible, basing on DR 811.
2010-02-07 Paolo Carlini <paolo.carlini@oracle.com> * include/bits/stl_pair.h (pair<>::pair(_U1&&, const _T2&), pair<>::pair(const _T1&, _U2&&), pair<>::pair(_U1&&, _U2&&)): Revert to std::is_convertible, basing on DR 811. From-SVN: r156570
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/include/bits/stl_pair.h10
2 files changed, 11 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 863d551..52ce813 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+2010-02-07 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/bits/stl_pair.h (pair<>::pair(_U1&&, const _T2&),
+ pair<>::pair(const _T1&, _U2&&), pair<>::pair(_U1&&, _U2&&)):
+ Revert to std::is_convertible, basing on DR 811.
+
2010-02-06 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/42989
diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h
index 9d7338b..11d0d10 100644
--- a/libstdc++-v3/include/bits/stl_pair.h
+++ b/libstdc++-v3/include/bits/stl_pair.h
@@ -1,6 +1,6 @@
// Pair implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -90,20 +90,20 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
#ifdef __GXX_EXPERIMENTAL_CXX0X__
// DR 811.
template<class _U1, class = typename
- std::enable_if<std::is_constructible<_T1, _U1&&>::value>::type>
+ std::enable_if<std::is_convertible<_U1, _T1>::value>::type>
pair(_U1&& __x, const _T2& __y)
: first(std::forward<_U1>(__x)),
second(__y) { }
template<class _U2, class = typename
- std::enable_if<std::is_constructible<_T2, _U2&&>::value>::type>
+ std::enable_if<std::is_convertible<_U2, _T2>::value>::type>
pair(const _T1& __x, _U2&& __y)
: first(__x),
second(std::forward<_U2>(__y)) { }
template<class _U1, class _U2, class = typename
- std::enable_if<std::is_constructible<_T1, _U1&&>::value
- && std::is_constructible<_T2, _U2&&>::value>::type>
+ std::enable_if<std::is_convertible<_U1, _T1>::value
+ && std::is_convertible<_U2, _T2>::value>::type>
pair(_U1&& __x, _U2&& __y)
: first(std::forward<_U1>(__x)),
second(std::forward<_U2>(__y)) { }