mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Protect use of std::is_trivially_copyable to compile with GCC 4.9
This commit is contained in:
		
							parent
							
								
									57a5fc40c0
								
							
						
					
					
						commit
						9572652ddc
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -192,7 +192,9 @@ public: | ||||||
|     size_t ReadArray(T* data, size_t length) |     size_t ReadArray(T* data, size_t length) | ||||||
|     { |     { | ||||||
|         static_assert(std::is_standard_layout<T>(), "Given array does not consist of standard layout objects"); |         static_assert(std::is_standard_layout<T>(), "Given array does not consist of standard layout objects"); | ||||||
|  | #if (__GNUC__ >= 5) || defined(__clang__) || defined(_MSC_VER) | ||||||
|         static_assert(std::is_trivially_copyable<T>(), "Given array does not consist of trivially copyable objects"); |         static_assert(std::is_trivially_copyable<T>(), "Given array does not consist of trivially copyable objects"); | ||||||
|  | #endif | ||||||
| 
 | 
 | ||||||
|         if (!IsOpen()) { |         if (!IsOpen()) { | ||||||
|             m_good = false; |             m_good = false; | ||||||
|  | @ -210,7 +212,9 @@ public: | ||||||
|     size_t WriteArray(const T* data, size_t length) |     size_t WriteArray(const T* data, size_t length) | ||||||
|     { |     { | ||||||
|         static_assert(std::is_standard_layout<T>(), "Given array does not consist of standard layout objects"); |         static_assert(std::is_standard_layout<T>(), "Given array does not consist of standard layout objects"); | ||||||
|  | #if (__GNUC__ >= 5) || defined(__clang__) || defined(_MSC_VER) | ||||||
|         static_assert(std::is_trivially_copyable<T>(), "Given array does not consist of trivially copyable objects"); |         static_assert(std::is_trivially_copyable<T>(), "Given array does not consist of trivially copyable objects"); | ||||||
|  | #endif | ||||||
| 
 | 
 | ||||||
|         if (!IsOpen()) { |         if (!IsOpen()) { | ||||||
|             m_good = false; |             m_good = false; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue