move.h (move_if_noexcept): Use __and_ and __not_.

2011-06-06  Paolo Carlini  <paolo.carlini@oracle.com>

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

From-SVN: r174708
This commit is contained in:
Paolo Carlini 2011-06-06 16:39:29 +00:00 committed by Paolo Carlini
parent 11b815cab8
commit 7aca3d94be
2 changed files with 6 additions and 2 deletions

View 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> 2011-06-05 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/bits/ptr_traits.h (pointer_traits): Fix typos. * include/bits/ptr_traits.h (pointer_traits): Fix typos.

View File

@ -90,8 +90,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/ */
template<typename _Tp> template<typename _Tp>
inline typename inline typename
conditional<(!is_nothrow_move_constructible<_Tp>::value conditional<__and_<__not_<is_nothrow_move_constructible<_Tp>>,
&& is_copy_constructible<_Tp>::value), is_copy_constructible<_Tp>>::value,
const _Tp&, _Tp&&>::type const _Tp&, _Tp&&>::type
move_if_noexcept(_Tp& __x) noexcept move_if_noexcept(_Tp& __x) noexcept
{ return std::move(__x); } { return std::move(__x); }