Template Struct ordered_map
Defined in File json.hpp
Inheritance Relationships
Base Type
public std::vector< std::pair< const Key, T >, std::allocator< std::pair< const Key, T > > >
Struct Documentation
-
template<class Key, class T, class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
struct ordered_map : public std::vector<std::pair<const Key, T>, std::allocator<std::pair<const Key, T>>> 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>
Public Types
Public Functions
-
inline ordered_map(std::initializer_list<value_type> init, const Allocator &alloc = Allocator())
-
template<class KeyType, detail::enable_if_t<detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
inline std::pair<iterator, bool> emplace(KeyType &&key, T &&t)
-
template<class KeyType, detail::enable_if_t<detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
inline T &operator[](KeyType &&key)
-
template<class KeyType, detail::enable_if_t<detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
inline const T &operator[](KeyType &&key) const
-
template<class KeyType, detail::enable_if_t<detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
inline T &at(KeyType &&key)
-
template<class KeyType, detail::enable_if_t<detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
inline const T &at(KeyType &&key) const
-
template<class KeyType, detail::enable_if_t<detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
inline size_type erase(KeyType &&key)
-
template<class KeyType, detail::enable_if_t<detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
inline size_type count(KeyType &&key) const
-
template<class KeyType, detail::enable_if_t<detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
inline iterator find(KeyType &&key)
-
inline const_iterator find(const key_type &key) const
-
inline std::pair<iterator, bool> insert(value_type &&value)
-
inline std::pair<iterator, bool> insert(const value_type &value)
-
template<typename InputIt, typename = require_input_iter<InputIt>>
inline void insert(InputIt first, InputIt last)
-
inline ordered_map(std::initializer_list<value_type> init, const Allocator &alloc = Allocator())