Use const Key in ordered map

(forgotten in previous commit!)
This commit is contained in:
gatopeich 2020-06-23 15:44:46 +01:00
parent 5e7bdf1cab
commit d08fca2bb9
2 changed files with 4 additions and 4 deletions

View file

@ -11,8 +11,8 @@ namespace nlohmann
/// ordered_map: a minimal map-like container that preserves insertion order
/// for use within nlohmann::basic_json<ordered_map>
template <class Key, class T, class IgnoredLess = std::less<Key>,
class Allocator = std::allocator<std::pair<Key, T>>,
class Container = std::vector<std::pair<Key, T>, Allocator>>
class Allocator = std::allocator<std::pair<const Key, T>>,
class Container = std::vector<std::pair<const Key, T>, Allocator>>
struct ordered_map : Container
{
using key_type = Key;

View file

@ -15880,8 +15880,8 @@ namespace nlohmann
/// ordered_map: a minimal map-like container that preserves insertion order
/// for use within nlohmann::basic_json<ordered_map>
template <class Key, class T, class IgnoredLess = std::less<Key>,
class Allocator = std::allocator<std::pair<Key, T>>,
class Container = std::vector<std::pair<Key, T>, Allocator>>
class Allocator = std::allocator<std::pair<const Key, T>>,
class Container = std::vector<std::pair<const Key, T>, Allocator>>
struct ordered_map : Container
{
using key_type = Key;