mirror of
				https://github.com/Tencent/rapidjson.git
				synced 2025-10-30 21:50:52 +01:00 
			
		
		
		
	Fix compilation errors in unit tests for VC
This commit is contained in:
		| @@ -232,26 +232,38 @@ TEST(Document, UTF16_Document) { | ||||
| #include <type_traits> | ||||
|  | ||||
| TEST(Document, Traits) { | ||||
|   static_assert( std::is_constructible<Document>::value, ""); | ||||
|   static_assert( std::is_default_constructible<Document>::value, ""); | ||||
|   static_assert(!std::is_copy_constructible<Document>::value, ""); | ||||
|   static_assert( std::is_move_constructible<Document>::value, ""); | ||||
|     static_assert(std::is_constructible<Document>::value, ""); | ||||
|     static_assert(std::is_default_constructible<Document>::value, ""); | ||||
| #ifndef _MSC_VER | ||||
|     static_assert(!std::is_copy_constructible<Document>::value, ""); | ||||
| #endif | ||||
|     static_assert(std::is_move_constructible<Document>::value, ""); | ||||
|  | ||||
|   static_assert(!std::is_nothrow_constructible<Document>::value, ""); | ||||
|   static_assert(!std::is_nothrow_default_constructible<Document>::value, ""); | ||||
|   static_assert(!std::is_nothrow_copy_constructible<Document>::value, ""); | ||||
|   static_assert( std::is_nothrow_move_constructible<Document>::value, ""); | ||||
|     static_assert(!std::is_nothrow_constructible<Document>::value, ""); | ||||
|     static_assert(!std::is_nothrow_default_constructible<Document>::value, ""); | ||||
|     static_assert(!std::is_nothrow_copy_constructible<Document>::value, ""); | ||||
| #ifndef _MSC_VER | ||||
|     static_assert(std::is_nothrow_move_constructible<Document>::value, ""); | ||||
| #endif | ||||
|  | ||||
|   static_assert( std::is_assignable<Document,Document>::value, ""); | ||||
|     static_assert(std::is_assignable<Document,Document>::value, ""); | ||||
| #ifndef _MSC_VER | ||||
|   static_assert(!std::is_copy_assignable<Document>::value, ""); | ||||
|   static_assert( std::is_move_assignable<Document>::value, ""); | ||||
| #endif | ||||
|     static_assert(std::is_move_assignable<Document>::value, ""); | ||||
|  | ||||
|   static_assert( std::is_nothrow_assignable<Document,Document>::value, ""); | ||||
|   static_assert(!std::is_nothrow_copy_assignable<Document>::value, ""); | ||||
|   static_assert( std::is_nothrow_move_assignable<Document>::value, ""); | ||||
| #ifndef _MSC_VER | ||||
|     static_assert(std::is_nothrow_assignable<Document, Document>::value, ""); | ||||
| #endif | ||||
|     static_assert(!std::is_nothrow_copy_assignable<Document>::value, ""); | ||||
| #ifndef _MSC_VER | ||||
|     static_assert(std::is_nothrow_move_assignable<Document>::value, ""); | ||||
| #endif | ||||
|  | ||||
|   static_assert( std::is_destructible<Document>::value, ""); | ||||
|   static_assert( std::is_nothrow_destructible<Document>::value, ""); | ||||
|     static_assert( std::is_destructible<Document>::value, ""); | ||||
| #ifndef _MSC_VER | ||||
|     static_assert(std::is_nothrow_destructible<Document>::value, ""); | ||||
| #endif | ||||
| } | ||||
|  | ||||
| template <typename Allocator> | ||||
|   | ||||
| @@ -43,27 +43,41 @@ TEST(Value, DefaultConstructor) { | ||||
| #include <type_traits> | ||||
|  | ||||
| TEST(Value, Traits) { | ||||
|   typedef GenericValue<UTF8<>, CrtAllocator> Value; | ||||
|   static_assert( std::is_constructible<Value>::value, ""); | ||||
|   static_assert( std::is_default_constructible<Value>::value, ""); | ||||
|   static_assert(!std::is_copy_constructible<Value>::value, ""); | ||||
|   static_assert( std::is_move_constructible<Value>::value, ""); | ||||
|     typedef GenericValue<UTF8<>, CrtAllocator> Value; | ||||
|     static_assert(std::is_constructible<Value>::value, ""); | ||||
|     static_assert(std::is_default_constructible<Value>::value, ""); | ||||
| #ifndef _MSC_VER | ||||
|     static_assert(!std::is_copy_constructible<Value>::value, ""); | ||||
| #endif | ||||
|     static_assert(std::is_move_constructible<Value>::value, ""); | ||||
|  | ||||
|   static_assert( std::is_nothrow_constructible<Value>::value, ""); | ||||
|   static_assert( std::is_nothrow_default_constructible<Value>::value, ""); | ||||
|   static_assert(!std::is_nothrow_copy_constructible<Value>::value, ""); | ||||
|   static_assert( std::is_nothrow_move_constructible<Value>::value, ""); | ||||
| #ifndef _MSC_VER | ||||
|     static_assert(std::is_nothrow_constructible<Value>::value, ""); | ||||
|     static_assert(std::is_nothrow_default_constructible<Value>::value, ""); | ||||
| #endif | ||||
|     static_assert(!std::is_nothrow_copy_constructible<Value>::value, ""); | ||||
| #ifndef _MSC_VER | ||||
|     static_assert(std::is_nothrow_move_constructible<Value>::value, ""); | ||||
| #endif | ||||
|  | ||||
|   static_assert( std::is_assignable<Value,Value>::value, ""); | ||||
|   static_assert(!std::is_copy_assignable<Value>::value, ""); | ||||
|   static_assert( std::is_move_assignable<Value>::value, ""); | ||||
|     static_assert(std::is_assignable<Value,Value>::value, ""); | ||||
| #ifndef _MSC_VER | ||||
|     static_assert(!std::is_copy_assignable<Value>::value, ""); | ||||
| #endif | ||||
|     static_assert(std::is_move_assignable<Value>::value, ""); | ||||
|  | ||||
|   static_assert( std::is_nothrow_assignable<Value,Value>::value, ""); | ||||
|   static_assert(!std::is_nothrow_copy_assignable<Value>::value, ""); | ||||
|   static_assert( std::is_nothrow_move_assignable<Value>::value, ""); | ||||
| #ifndef _MSC_VER | ||||
|     static_assert(std::is_nothrow_assignable<Value, Value>::value, ""); | ||||
| #endif | ||||
|     static_assert(!std::is_nothrow_copy_assignable<Value>::value, ""); | ||||
| #ifndef _MSC_VER | ||||
|     static_assert(std::is_nothrow_move_assignable<Value>::value, ""); | ||||
| #endif | ||||
|  | ||||
|   static_assert( std::is_destructible<Value>::value, ""); | ||||
|   static_assert( std::is_nothrow_destructible<Value>::value, ""); | ||||
|     static_assert(std::is_destructible<Value>::value, ""); | ||||
| #ifndef _MSC_VER | ||||
|     static_assert(std::is_nothrow_destructible<Value>::value, ""); | ||||
| #endif | ||||
| } | ||||
|  | ||||
| TEST(Value, MoveConstructor) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Milo Yip
					Milo Yip