Skip to content

Commit

Permalink
Remove basic_json(allocator_type) constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
danielaparker committed Oct 18, 2024
1 parent c74713b commit a0763bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
4 changes: 2 additions & 2 deletions include/jsoncons/basic_json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3023,7 +3023,7 @@ namespace jsoncons {
{
construct<empty_object_storage>(semantic_tag::none);
}

/*
explicit basic_json(const Allocator& alloc)
{
construct<object_storage>(object(alloc), semantic_tag::none);
Expand All @@ -3033,7 +3033,7 @@ namespace jsoncons {
{
construct<object_storage>(object(alloc), tag);
}

*/
basic_json(semantic_tag tag)
{
construct<empty_object_storage>(tag);
Expand Down
19 changes: 0 additions & 19 deletions test/corelib/src/json_constructor_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,6 @@ TEST_CASE("json constructor with pmr allocator")
CHECK(it != last1);
}

SECTION("empty object with given allocator")
{
jsoncons::pmr::json j1{alloc1};
REQUIRE(j1.is_object());
REQUIRE(&pool1 == j1.get_allocator().resource());
}

SECTION("object move constructor")
{
jsoncons::pmr::json j1{jsoncons::json_object_arg, alloc1};
Expand All @@ -205,18 +198,6 @@ TEST_CASE("json constructor with pmr allocator")
CHECK(it != last1);
}

SECTION("test 2")
{
jsoncons::pmr::json j1{ alloc1 };

j1[long_key1] = long_string1;

auto it = std::search(buffer1, last1, long_string1, long_string1_end);
CHECK(it != last1);

it = std::search(buffer1, last1, long_key1, long_key1_end);
CHECK(it != last1);
}
SECTION("test 3")
{
jsoncons::pmr::json j1(long_string1);
Expand Down

0 comments on commit a0763bf

Please sign in to comment.