]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
stl_pair.h (pair<>::pair(_U1&&, const _T2&), [...]): Use std::is_constructible instea...
authorPaolo Carlini <paolo.carlini@oracle.com>
Sun, 3 Jan 2010 12:06:59 +0000 (12:06 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 3 Jan 2010 12:06:59 +0000 (12:06 +0000)
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

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_pair.h

index dcc25f38e41bfdd31c0b710bd79ad13952da0fa1..a4c525ccf3c71c704b5c2dcb1bf430610a5643fc 100644 (file)
@@ -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.
index 4a9fb6be485c6cd783d62527b10c8fa3c16dc2c6..9d7338bc55bfb1cedd7acc785d2d5ed5440ae9a4 100644 (file)
@@ -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)) { }