mirror of
https://github.com/nlohmann/json.git
synced 2025-07-31 10:24:23 +03:00
reverted change wrt. Erasable concept
This commit is contained in:
@ -143,9 +143,6 @@ default)
|
|||||||
- [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer);
|
- [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer);
|
||||||
JSON values can be used like STL containers and provide reverse iterator
|
JSON values can be used like STL containers and provide reverse iterator
|
||||||
access.
|
access.
|
||||||
- Container Elements
|
|
||||||
- [Eraseable](http://en.cppreference.com/w/cpp/concept/Erasable):
|
|
||||||
JSON values can be destroyed by a given allocator.
|
|
||||||
|
|
||||||
@internal
|
@internal
|
||||||
@note ObjectType trick from http://stackoverflow.com/a/9860911
|
@note ObjectType trick from http://stackoverflow.com/a/9860911
|
||||||
|
@ -10767,24 +10767,6 @@ TEST_CASE("concepts")
|
|||||||
|
|
||||||
// the expression "X()" has the post-condition "X().empty()"
|
// the expression "X()" has the post-condition "X().empty()"
|
||||||
CHECK(json().empty());
|
CHECK(json().empty());
|
||||||
|
|
||||||
|
|
||||||
// from http://en.cppreference.com/w/cpp/concept/Container:
|
|
||||||
// T must be Eraseable
|
|
||||||
{
|
|
||||||
// prepare
|
|
||||||
auto m = json::get_allocator();
|
|
||||||
json* p = m.allocate(1);
|
|
||||||
m.construct(p, "foo");
|
|
||||||
|
|
||||||
// required
|
|
||||||
std::allocator_traits<json::allocator_type>::destroy(m, p);
|
|
||||||
|
|
||||||
CHECK(*p == "foo");
|
|
||||||
|
|
||||||
// cleanup
|
|
||||||
m.deallocate(p, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTION("class json")
|
SECTION("class json")
|
||||||
|
Reference in New Issue
Block a user