This commit is contained in:
nlohmann
2026-09-15 20:47:46 +00:00
parent 7b7abfd224
commit db9042b6ac
306 changed files with 4213 additions and 781 deletions
+2 -1
View File
@@ -17,7 +17,7 @@ To store objects in C++, a type is defined by the template parameters described
## Template parameters
`ObjectType` : the container to store objects (e.g., `std::map` or `std::unordered_map`)
`ObjectType` : the container to store objects. Its template parameters must have the same order and meaning as those of `std::map`; in particular, the third parameter is a comparator. `std::unordered_map`, whose third parameter is a hash function, therefore needs an adapter -- see [Template Parameter Requirements](https://json.nlohmann.me/features/types/template_parameters/#objecttype) for the full list of requirements, an adapter example, and the containers that are known to work.
`StringType` : the type of the keys or names (e.g., `std::string`). The comparison function `std::less<StringType>` is used to order elements inside the container.
@@ -106,3 +106,4 @@ true
## Version history
- Added in version 1.0.0.
- Allowed object types whose `erase(iterator)` returns `void` in version 3.13.0.