diff options
author | Howard Hinnant <hhinnant@apple.com> | 2011-06-03 15:16:49 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2011-06-03 15:16:49 +0000 |
commit | 801291139c70bef4e20af81f80cf509578514ca8 (patch) | |
tree | 46c9aeb02bd155027b7168e75b10e2b1094ef0f4 /libcxx/include/__split_buffer | |
parent | e97fee6c862188de71f61467ce7f641fed95377b (diff) | |
download | bcm5719-llvm-801291139c70bef4e20af81f80cf509578514ca8.tar.gz bcm5719-llvm-801291139c70bef4e20af81f80cf509578514ca8.zip |
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
Diffstat (limited to 'libcxx/include/__split_buffer')
-rw-r--r-- | libcxx/include/__split_buffer | 4 |
1 files changed, 3 insertions, 1 deletions
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<allocator_type>::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 <class _Tp, class _Allocator> _LIBCPP_INLINE_VISIBILITY inline __split_buffer<_Tp, _Allocator>::__split_buffer() + _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value) : __first_(0), __begin_(0), __end_(0), __end_cap_(0) { } |