Skip to content

Commit

Permalink
🎨 fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Apr 10, 2020
1 parent ea0a7c7 commit 6121fc5
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions test/src/unit-allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,13 @@ struct allocator_no_forward : std::allocator<T>
allocator_no_forward(allocator_no_forward<U>) {}

template <class U>
struct rebind {
struct rebind
{
using other = allocator_no_forward<U>;
};

template <class... Args>
void construct(T* p, const Args&... args)
void construct(T* p, const Args& ... args)
{
// force copy even if move is available
::new (static_cast<void*>(p)) T(args...);
Expand All @@ -263,16 +264,16 @@ TEST_CASE("bad my_allocator::construct")
SECTION("my_allocator::construct doesn't forward")
{
using bad_alloc_json = nlohmann::basic_json<std::map,
std::vector,
std::string,
bool,
std::int64_t,
std::uint64_t,
double,
allocator_no_forward>;
std::vector,
std::string,
bool,
std::int64_t,
std::uint64_t,
double,
allocator_no_forward>;

bad_alloc_json json;
json["test"] = bad_alloc_json::array_t();
json["test"].push_back("should not leak");
bad_alloc_json json;
json["test"] = bad_alloc_json::array_t();
json["test"].push_back("should not leak");
}
}

0 comments on commit 6121fc5

Please sign in to comment.