From 801291139c70bef4e20af81f80cf509578514ca8 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Fri, 3 Jun 2011 15:16:49 +0000 Subject: After sleeping on it I've decided that all special members that can be noexcept, should be declared so. The client has the traits to detect and branch on this information, and it is often an important optimization. Give deque() a noexcept. Add test for deque default constructor and deque destructor. llvm-svn: 132549 --- libcxx/include/__split_buffer | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libcxx/include/__split_buffer') diff --git a/libcxx/include/__split_buffer b/libcxx/include/__split_buffer index e68b78508cc..7c22e484bf1 100644 --- a/libcxx/include/__split_buffer +++ b/libcxx/include/__split_buffer @@ -52,7 +52,8 @@ public: _LIBCPP_INLINE_VISIBILITY pointer& __end_cap() _NOEXCEPT {return __end_cap_.first();} _LIBCPP_INLINE_VISIBILITY const pointer& __end_cap() const _NOEXCEPT {return __end_cap_.first();} - __split_buffer(); + __split_buffer() + _NOEXCEPT_(is_nothrow_default_constructible::value); explicit __split_buffer(__alloc_rr& __a); explicit __split_buffer(const __alloc_rr& __a); __split_buffer(size_type __cap, size_type __start, __alloc_rr& __a); @@ -323,6 +324,7 @@ __split_buffer<_Tp, _Allocator>::__split_buffer(size_type __cap, size_type __sta template _LIBCPP_INLINE_VISIBILITY inline __split_buffer<_Tp, _Allocator>::__split_buffer() + _NOEXCEPT_(is_nothrow_default_constructible::value) : __first_(0), __begin_(0), __end_(0), __end_cap_(0) { } -- cgit v1.2.3