Feel++ 0.111.0-preview.14
Finite Element Embedded Library in C++
nlohmann::ordered_map< Key, T, IgnoredLess, Allocator > Struct Template Reference

a minimal map-like container that preserves insertion order More...

+ Inheritance diagram for nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >:
+ Collaboration diagram for nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >:

Public Types

using const_iterator = typename Container::const_iterator
 
using Container = std::vector< std::pair< const Key, T >, Allocator >
 
using iterator = typename Container::iterator
 
using key_type = Key
 
using mapped_type = T
 
template<typename InputIt >
using require_input_iter = typename std::enable_if< std::is_convertible< typename std::iterator_traits< InputIt >::iterator_category, std::input_iterator_tag >::value >::type
 
using size_type = typename Container::size_type
 
using value_type = typename Container::value_type
 

Public Member Functions

T & at (const Key &key)
 
const T & at (const Key &key) const
 
size_type count (const Key &key) const
 
std::pair< iterator, bool > emplace (const key_type &key, T &&t)
 
size_type erase (const Key &key)
 
iterator erase (iterator first, iterator last)
 
iterator erase (iterator pos)
 
iterator find (const Key &key)
 
const_iterator find (const Key &key) const
 
std::pair< iterator, bool > insert (const value_type &value)
 
template<typename InputIt , typename = require_input_iter<InputIt>>
void insert (InputIt first, InputIt last)
 
std::pair< iterator, bool > insert (value_type &&value)
 
T & operator[] (const Key &key)
 
const T & operator[] (const Key &key) const
 
 ordered_map (const Allocator &alloc=Allocator())
 
template<class It >
 ordered_map (It first, It last, const Allocator &alloc=Allocator())
 
 ordered_map (std::initializer_list< T > init, const Allocator &alloc=Allocator())
 

Detailed Description

template<class Key, class T, class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
struct nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >

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>

See also
https://json.nlohmann.me/api/ordered_map/