aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2010-01-03 12:06:59 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2010-01-03 12:06:59 +0000
commita8685e159ea52ae6507622f2a81e73f00ace490f (patch)
tree076957c571406e1b42591beedc9be2e26a29927e
parenta19eb9d236caf919b2a41445a72c30cffe12a432 (diff)
downloadgcc-a8685e159ea52ae6507622f2a81e73f00ace490f.zip
gcc-a8685e159ea52ae6507622f2a81e73f00ace490f.tar.gz
gcc-a8685e159ea52ae6507622f2a81e73f00ace490f.tar.bz2
stl_pair.h (pair<>::pair(_U1&&, const _T2&), [...]): Use std::is_constructible instead of std::is_convertible.
2010-01-03 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&&)): Use std::is_constructible instead of std::is_convertible. From-SVN: r155585
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/include/bits/stl_pair.h8
2 files changed, 10 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index dcc25f3..a4c525c 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+2010-01-03 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&&)):
+ Use std::is_constructible instead of std::is_convertible.
+
2010-01-01 Paolo Carlini <paolo.carlini@oracle.com>
Revert last change, reinstantiate basic_string and vstring tests.
diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h
index 4a9fb6b..9d7338b 100644
--- a/libstdc++-v3/include/bits/stl_pair.h
+++ b/libstdc++-v3/include/bits/stl_pair.h
@@ -90,20 +90,20 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
#ifdef __GXX_EXPERIMENTAL_CXX0X__
// DR 811.
template<class _U1, class = typename
- std::enable_if<std::is_convertible<_U1, _T1>::value>::type>
+ std::enable_if<std::is_constructible<_T1, _U1&&>::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_convertible<_U2, _T2>::value>::type>
+ std::enable_if<std::is_constructible<_T2, _U2&&>::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_convertible<_U1, _T1>::value
- && std::is_convertible<_U2, _T2>::value>::type>
+ std::enable_if<std::is_constructible<_T1, _U1&&>::value
+ && std::is_constructible<_T2, _U2&&>::value>::type>
pair(_U1&& __x, _U2&& __y)
: first(std::forward<_U1>(__x)),
second(std::forward<_U2>(__y)) { }