Fixed formatting, trying to fix msvc build error in appveyor
This commit is contained in:
		
							parent
							
								
									a74a031bba
								
							
						
					
					
						commit
						4ce31695f1
					
				
					 1 changed files with 15 additions and 26 deletions
				
			
		|  | @ -238,28 +238,17 @@ TEST_CASE("controlled bad_alloc") | ||||||
| namespace | namespace | ||||||
| { | { | ||||||
| template<class T> | template<class T> | ||||||
| struct allocator_no_forward | struct allocator_no_forward : std::allocator<T> | ||||||
| { | { | ||||||
|     typedef T value_type; |  | ||||||
|     template <typename U> |     template <typename U> | ||||||
|     struct rebind |     struct rebind { | ||||||
|     { |  | ||||||
|         typedef allocator_no_forward<U> other; |         typedef allocator_no_forward<U> other; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     T* allocate(size_t sz) |     template <class... Args> | ||||||
|  |     void construct(T* p, const Args&... args) | ||||||
|     { |     { | ||||||
|         return static_cast<T*>(malloc(sz * sizeof(T))); |         ::new (static_cast<void*>(p)) T(args...); | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     void deallocate(T* p, size_t) |  | ||||||
|     { |  | ||||||
|         free(p); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     void construct(T* p, const T& arg) |  | ||||||
|     { |  | ||||||
|         ::new (static_cast<void*>(p)) T(arg); |  | ||||||
|     } |     } | ||||||
| }; | }; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue