More of N4258 implementation. Mark all of our test_allocators as noexcept constructible. Make the constructors for basic_string noexcept all the time (under C++14). Update tests to reflect the new world order. More to come.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@238957 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2015-06-03 19:56:43 +00:00
parent bbf87b1c34
commit 7b193f7797
8 changed files with 113 additions and 29 deletions

View File

@@ -17,6 +17,7 @@
#include <string>
#include <cassert>
#include "test_macros.h"
#include "test_allocator.h"
template <class T>
@@ -39,7 +40,12 @@ 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
}