From: Jonathan Wakely Date: Wed, 17 Jun 2015 10:51:46 +0000 (+0100) Subject: alloc_traits.h (__alloc_traits::_S_nothrow_swap()): Use __is_nothrow_swappable. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c92334d4c5e7cbffa91822ff0305e87eff069296;p=gcc.git alloc_traits.h (__alloc_traits::_S_nothrow_swap()): Use __is_nothrow_swappable. * include/ext/alloc_traits.h (__alloc_traits::_S_nothrow_swap()): Use __is_nothrow_swappable. From-SVN: r224552 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a9ed2064aea..caa32f7383a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2015-06-17 Jonathan Wakely + + * include/ext/alloc_traits.h (__alloc_traits::_S_nothrow_swap()): Use + __is_nothrow_swappable. + 2015-06-16 Jonathan Wakely * include/bits/allocated_ptr.h (__allocated_ptr): Use __addressof. diff --git a/libstdc++-v3/include/ext/alloc_traits.h b/libstdc++-v3/include/ext/alloc_traits.h index 06bc70a4cb2..bd0f75945aa 100644 --- a/libstdc++-v3/include/ext/alloc_traits.h +++ b/libstdc++-v3/include/ext/alloc_traits.h @@ -159,9 +159,8 @@ template static constexpr bool _S_nothrow_swap() { - using std::swap; return !_S_propagate_on_swap() - || noexcept(swap(std::declval<_Alloc&>(), std::declval<_Alloc&>())); + || std::__is_nothrow_swappable<_Alloc>::value; } template