summaryrefslogtreecommitdiffstats
path: root/libcxx/include/__split_buffer
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2015-07-13 20:04:56 +0000
committerMarshall Clow <mclow.lists@gmail.com>2015-07-13 20:04:56 +0000
commite3fbe1433b02d52a833b06219184ee4f4852b50a (patch)
treeb1be725f7d35363bf0681fd6fd3f4938fe0a37d5 /libcxx/include/__split_buffer
parent75a7e435813d28751f9555a11dd171e389be2d1e (diff)
downloadbcm5719-llvm-e3fbe1433b02d52a833b06219184ee4f4852b50a.tar.gz
bcm5719-llvm-e3fbe1433b02d52a833b06219184ee4f4852b50a.zip
Implement the first part of N4258: 'Cleaning up noexcept in the Library'. This patch deals with swapping containers, and implements a more strict noexcept specification (a conforming extension) than the standard mandates.
llvm-svn: 242056
Diffstat (limited to 'libcxx/include/__split_buffer')
-rw-r--r--libcxx/include/__split_buffer21
1 files changed, 1 insertions, 20 deletions
diff --git a/libcxx/include/__split_buffer b/libcxx/include/__split_buffer
index 1d529cbe27d..727b1b6b567 100644
--- a/libcxx/include/__split_buffer
+++ b/libcxx/include/__split_buffer
@@ -156,25 +156,6 @@ private:
_LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(__split_buffer&, false_type) _NOEXCEPT
{}
-
- _LIBCPP_INLINE_VISIBILITY
- static void __swap_alloc(__alloc_rr& __x, __alloc_rr& __y)
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value||
- __is_nothrow_swappable<__alloc_rr>::value)
- {__swap_alloc(__x, __y, integral_constant<bool,
- __alloc_traits::propagate_on_container_swap::value>());}
-
- _LIBCPP_INLINE_VISIBILITY
- static void __swap_alloc(__alloc_rr& __x, __alloc_rr& __y, true_type)
- _NOEXCEPT_(__is_nothrow_swappable<__alloc_rr>::value)
- {
- using _VSTD::swap;
- swap(__x, __y);
- }
-
- _LIBCPP_INLINE_VISIBILITY
- static void __swap_alloc(__alloc_rr&, __alloc_rr&, false_type) _NOEXCEPT
- {}
};
template <class _Tp, class _Allocator>
@@ -431,7 +412,7 @@ __split_buffer<_Tp, _Allocator>::swap(__split_buffer& __x)
_VSTD::swap(__begin_, __x.__begin_);
_VSTD::swap(__end_, __x.__end_);
_VSTD::swap(__end_cap(), __x.__end_cap());
- __swap_alloc(__alloc(), __x.__alloc());
+ __swap_allocator(__alloc(), __x.__alloc());
}
template <class _Tp, class _Allocator>
OpenPOWER on IntegriCloud