Have 4 template parameters for ordered_map
This commit is contained in:
parent
cf18ba2394
commit
49f26a0250
2 changed files with 7 additions and 7 deletions
|
@ -11,10 +11,10 @@ namespace nlohmann
|
||||||
/// ordered_map: a minimal map-like container that preserves insertion order
|
/// ordered_map: a minimal map-like container that preserves insertion order
|
||||||
/// for use within nlohmann::basic_json<ordered_map>
|
/// for use within nlohmann::basic_json<ordered_map>
|
||||||
template <class Key, class T, class IgnoredLess = std::less<Key>,
|
template <class Key, class T, class IgnoredLess = std::less<Key>,
|
||||||
class Allocator = std::allocator<std::pair<const Key, T>>,
|
class Allocator = std::allocator<std::pair<const Key, T>>>
|
||||||
class Container = std::vector<std::pair<const Key, T>, Allocator>>
|
struct ordered_map : std::vector<typename Allocator::value_type, Allocator>
|
||||||
struct ordered_map : Container
|
|
||||||
{
|
{
|
||||||
|
using Container = std::vector<typename Allocator::value_type, Allocator>;
|
||||||
using key_type = Key;
|
using key_type = Key;
|
||||||
using mapped_type = T;
|
using mapped_type = T;
|
||||||
using typename Container::iterator;
|
using typename Container::iterator;
|
||||||
|
|
|
@ -2773,7 +2773,7 @@ uses the standard template types.
|
||||||
*/
|
*/
|
||||||
using json = basic_json<>;
|
using json = basic_json<>;
|
||||||
|
|
||||||
template<class Key, class T, class IgnoredLess, class Allocator, class Container>
|
template<class Key, class T, class IgnoredLess, class Allocator>
|
||||||
struct ordered_map;
|
struct ordered_map;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -15880,10 +15880,10 @@ namespace nlohmann
|
||||||
/// ordered_map: a minimal map-like container that preserves insertion order
|
/// ordered_map: a minimal map-like container that preserves insertion order
|
||||||
/// for use within nlohmann::basic_json<ordered_map>
|
/// for use within nlohmann::basic_json<ordered_map>
|
||||||
template <class Key, class T, class IgnoredLess = std::less<Key>,
|
template <class Key, class T, class IgnoredLess = std::less<Key>,
|
||||||
class Allocator = std::allocator<std::pair<const Key, T>>,
|
class Allocator = std::allocator<std::pair<const Key, T>>>
|
||||||
class Container = std::vector<std::pair<const Key, T>, Allocator>>
|
struct ordered_map : std::vector<typename Allocator::value_type, Allocator>
|
||||||
struct ordered_map : Container
|
|
||||||
{
|
{
|
||||||
|
using Container = std::vector<typename Allocator::value_type, Allocator>;
|
||||||
using key_type = Key;
|
using key_type = Key;
|
||||||
using mapped_type = T;
|
using mapped_type = T;
|
||||||
using typename Container::iterator;
|
using typename Container::iterator;
|
||||||
|
|
Loading…
Reference in a new issue