🎨 fix indentation

This commit is contained in:
Niels Lohmann 2020-04-10 13:22:58 +02:00
parent ea0a7c7b4f
commit 6121fc52cf
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69

View File

@ -245,12 +245,13 @@ struct allocator_no_forward : std::allocator<T>
allocator_no_forward(allocator_no_forward<U>) {} allocator_no_forward(allocator_no_forward<U>) {}
template <class U> template <class U>
struct rebind { struct rebind
{
using other = allocator_no_forward<U>; using other = allocator_no_forward<U>;
}; };
template <class... Args> template <class... Args>
void construct(T* p, const Args&... args) void construct(T* p, const Args& ... args)
{ {
// force copy even if move is available // force copy even if move is available
::new (static_cast<void*>(p)) T(args...); ::new (static_cast<void*>(p)) T(args...);
@ -263,16 +264,16 @@ TEST_CASE("bad my_allocator::construct")
SECTION("my_allocator::construct doesn't forward") SECTION("my_allocator::construct doesn't forward")
{ {
using bad_alloc_json = nlohmann::basic_json<std::map, using bad_alloc_json = nlohmann::basic_json<std::map,
std::vector, std::vector,
std::string, std::string,
bool, bool,
std::int64_t, std::int64_t,
std::uint64_t, std::uint64_t,
double, double,
allocator_no_forward>; allocator_no_forward>;
bad_alloc_json json; bad_alloc_json json;
json["test"] = bad_alloc_json::array_t(); json["test"] = bad_alloc_json::array_t();
json["test"].push_back("should not leak"); json["test"].push_back("should not leak");
} }
} }