diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2015-06-04 02:05:41 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2015-06-04 02:05:41 +0000 |
commit | 979550f2210e5c5fb1c061f5b88cdcbd6fa40f36 (patch) | |
tree | 3b6df71c23063513f992dd0bb06f86dce638b8b0 /libcxx | |
parent | 70c61c1a8adad268f1058986aa501afb142ecb4c (diff) | |
download | bcm5719-llvm-979550f2210e5c5fb1c061f5b88cdcbd6fa40f36.tar.gz bcm5719-llvm-979550f2210e5c5fb1c061f5b88cdcbd6fa40f36.zip |
While applying N4258, I forgot about LWG#2455, which modified the modifications. Correct those - h/t: Howard
llvm-svn: 239004
Diffstat (limited to 'libcxx')
6 files changed, 5 insertions, 51 deletions
diff --git a/libcxx/include/string b/libcxx/include/string index b8cbea317d5..ac7b30a6167 100644 --- a/libcxx/include/string +++ b/libcxx/include/string @@ -1321,11 +1321,7 @@ public: static const size_type npos = -1; _LIBCPP_INLINE_VISIBILITY basic_string() -#if _LIBCPP_STD_VER <= 14 _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value); -#else - _NOEXCEPT; -#endif _LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a) #if _LIBCPP_STD_VER <= 14 @@ -1943,11 +1939,7 @@ basic_string<_CharT, _Traits, _Allocator>::__invalidate_iterators_past(size_type template <class _CharT, class _Traits, class _Allocator> inline _LIBCPP_INLINE_VISIBILITY basic_string<_CharT, _Traits, _Allocator>::basic_string() -#if _LIBCPP_STD_VER <= 14 - _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value) -#else - _NOEXCEPT -#endif + _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value) { #if _LIBCPP_DEBUG_LEVEL >= 2 __get_db()->__insert_c(this); diff --git a/libcxx/include/vector b/libcxx/include/vector index ec413fa6e8e..36001479daa 100644 --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -500,12 +500,7 @@ public: "Allocator::value_type must be same type as value_type"); _LIBCPP_INLINE_VISIBILITY - vector() -#if _LIBCPP_STD_VER <= 14 - _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value) -#else - _NOEXCEPT -#endif + vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value) { #if _LIBCPP_DEBUG_LEVEL >= 2 __get_db()->__insert_c(this); @@ -2170,12 +2165,7 @@ private: public: _LIBCPP_INLINE_VISIBILITY - vector() -#if _LIBCPP_STD_VER <= 14 - _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value); -#else - _NOEXCEPT; -#endif + vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value); _LIBCPP_INLINE_VISIBILITY explicit vector(const allocator_type& __a) #if _LIBCPP_STD_VER <= 14 @@ -2569,11 +2559,7 @@ vector<bool, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardI template <class _Allocator> inline _LIBCPP_INLINE_VISIBILITY vector<bool, _Allocator>::vector() -#if _LIBCPP_STD_VER <= 14 - _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value) -#else - _NOEXCEPT -#endif + _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value) : __begin_(nullptr), __size_(0), __cap_alloc_(0) diff --git a/libcxx/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp index d0a96480834..b94588ead93 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp @@ -39,21 +39,11 @@ int main() } { typedef std::vector<bool, other_allocator<bool>> C; -// See N4258 - vector<T, Allocator>::basic_string() noexcept; -#if TEST_STD_VER <= 14 static_assert(!std::is_nothrow_default_constructible<C>::value, ""); -#else - static_assert( std::is_nothrow_default_constructible<C>::value, ""); -#endif } { typedef std::vector<bool, some_alloc<bool>> C; -// See N4258 - vector<T, Allocator>::basic_string() noexcept; -#if TEST_STD_VER <= 14 static_assert(!std::is_nothrow_default_constructible<C>::value, ""); -#else - static_assert( std::is_nothrow_default_constructible<C>::value, ""); -#endif } #endif } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp index 9d757bf576a..5e87c07ef70 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp @@ -15,6 +15,7 @@ #include <vector> #include <cassert> +#include "test_macros.h" #include "test_allocator.h" #include "../../../NotConstructible.h" #include "../../../stack_allocator.h" diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp index e13a5fc0d35..60f7b72c947 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp @@ -41,21 +41,11 @@ int main() } { typedef std::vector<MoveOnly, other_allocator<MoveOnly>> C; -// See N4258 - vector<T, Allocator>::basic_string() noexcept; -#if TEST_STD_VER <= 14 static_assert(!std::is_nothrow_default_constructible<C>::value, ""); -#else - static_assert( std::is_nothrow_default_constructible<C>::value, ""); -#endif } { typedef std::vector<MoveOnly, some_alloc<MoveOnly>> C; -// See N4258 - vector<T, Allocator>::basic_string() noexcept; -#if TEST_STD_VER <= 14 static_assert(!std::is_nothrow_default_constructible<C>::value, ""); -#else - static_assert( std::is_nothrow_default_constructible<C>::value, ""); -#endif } #endif } diff --git a/libcxx/test/std/strings/basic.string/string.cons/default_noexcept.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/default_noexcept.pass.cpp index c6137d6b54b..af117103d82 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/default_noexcept.pass.cpp @@ -40,12 +40,7 @@ int main() } { typedef std::basic_string<char, std::char_traits<char>, some_alloc<char>> C; -// See N4258 - basic_string<char, traits, Allocator>::basic_string() noexcept; -#if TEST_STD_VER <= 14 static_assert(!std::is_nothrow_default_constructible<C>::value, ""); -#else - static_assert( std::is_nothrow_default_constructible<C>::value, ""); -#endif } #endif } |