MCPcopy Create free account
hub / github.com/ashvardanian/less_slow.cpp / json_containers_for_alloc

Class json_containers_for_alloc

less_slow.cpp:5103–5113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5101template <template <typename> typename allocator_>
5102
5103struct json_containers_for_alloc {
5104 // Must allow `map<Key, Value, typename... Args>`, replaces `std::map`
5105 template <typename key_type_, typename value_type_, typename...>
5106 using object = std::map<key_type_, value_type_, std::less<>, allocator_<std::pair<key_type_ const, value_type_>>>;
5107
5108 // Must allow `vector<Value, typename... Args>`, replaces `std::vector`
5109 template <typename value_type_, typename...>
5110 using array = std::vector<value_type_, allocator_<value_type_>>;
5111
5112 using string = std::basic_string<char, std::char_traits<char>, allocator_<char>>;
5113};
5114
5115template <template <typename> typename allocator_>
5116using json_with_alloc = nlohmann::basic_json< //

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected