mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 01:18:52 +08:00
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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user