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
This commit is contained in:
Jonathan Wakely 2015-06-17 11:51:46 +01:00 committed by Jonathan Wakely
parent db40fbca24
commit c92334d4c5
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2015-06-17 Jonathan Wakely <jwakely@redhat.com>
* include/ext/alloc_traits.h (__alloc_traits::_S_nothrow_swap()): Use
__is_nothrow_swappable.
2015-06-16 Jonathan Wakely <jwakely@redhat.com>
* include/bits/allocated_ptr.h (__allocated_ptr): Use __addressof.

View File

@ -159,9 +159,8 @@ template<typename _Alloc>
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<typename _Tp>