move.h (move_if_noexcept): Use __and_ and __not_.
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 6 Jun 2011 16:39:29 +0000 (16:39 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 6 Jun 2011 16:39:29 +0000 (16:39 +0000)
2011-06-06  Paolo Carlini  <paolo.carlini@oracle.com>

* include/bits/move.h (move_if_noexcept): Use __and_ and __not_.

From-SVN: r174708

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

index 2f485b1423d8ef83a7d65e72bd20de210ca92f88..ff7e2dad42605fca6d928cd7fe80d4fde7ca2be1 100644 (file)
@@ -1,3 +1,7 @@
+2011-06-06  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * include/bits/move.h (move_if_noexcept): Use __and_ and __not_.
+
 2011-06-05  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
        * include/bits/ptr_traits.h (pointer_traits): Fix typos.
index ca7686eb1623739767ff701b8bd409900cf1453e..6f3b420640d756239927f9f1a5957920b69daac3 100644 (file)
@@ -90,8 +90,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
    */
   template<typename _Tp>
     inline typename
-    conditional<(!is_nothrow_move_constructible<_Tp>::value
-                && is_copy_constructible<_Tp>::value),
+    conditional<__and_<__not_<is_nothrow_move_constructible<_Tp>>,
+                       is_copy_constructible<_Tp>>::value,
                 const _Tp&, _Tp&&>::type
     move_if_noexcept(_Tp& __x) noexcept
     { return std::move(__x); }