Custom ObjectTypes are in hard limits:
basic_json<> // ok
basic_json<std::map> // ok (the same)
template<class Key, class Value, class Comp, class Alloc>
my_stl_like_map {};
basic_json<my_stl_like_map> // ok (the same)
basic_json<std::unordered_map> // Won't compile (hash != comparator)
template<class Key, class Value>
MyMap {};
basic_json<MyMap> // Won't compile (too few templates)
I suggest changing the following line with some metaprogramming or using only Key and Value:
using object_t = ObjectType<StringType,
basic_json,
/* Maybe leave those below as default (won't allow custom allocators :( ) */
object_comparator_t,
AllocatorType<std::pair<const StringType,
basic_json>>>;
Custom
ObjectTypesare in hard limits:I suggest changing the following line with some metaprogramming or using only Key and Value: