Go to the documentation of this file.
13 #ifndef MOMO_INCLUDE_GUARD_STDISH_SET_MAP_UTILITY
14 #define MOMO_INCLUDE_GUARD_STDISH_SET_MAP_UTILITY
16 #include "../SetUtility.h"
17 #include "../MapUtility.h"
19 #ifdef MOMO_HAS_CONTAINERS_RANGES
31 template<
typename TSetExtractedItem>
47 noexcept(std::is_nothrow_move_constructible<SetExtractedItem>::value)
48 : mSetExtractedItem(
std::move(node.mSetExtractedItem))
54 template<
typename Set>
56 : mSetExtractedItem(
set.get_nested_container(), iter)
68 return mSetExtractedItem.IsEmpty();
71 explicit operator bool() const noexcept
78 return mSetExtractedItem.GetItem();
83 return mSetExtractedItem.GetItem();
94 return mSetExtractedItem;
101 template<
typename TMapExtractedPair>
113 template<
typename Map>
114 struct ConstIteratorProxy :
private Map::const_iterator
116 typedef typename Map::const_iterator ConstIterator;
118 typename ConstIterator::BaseIterator)
127 noexcept(std::is_nothrow_move_constructible<MapExtractedPair>::value)
128 : mMapExtractedPair(
std::move(node.mMapExtractedPair))
134 template<
typename Map>
136 : mMapExtractedPair(
map.get_nested_container(),
137 ConstIteratorProxy<Map>::GetBaseIterator(iter))
149 return mMapExtractedPair.IsEmpty();
152 explicit operator bool() const noexcept
159 return mMapExtractedPair.GetKey();
164 return mMapExtractedPair.GetKey();
169 return mMapExtractedPair.GetValue();
174 return mMapExtractedPair.GetValue();
185 return mMapExtractedPair;
192 template<
typename Iterator,
typename NodeHandle>
200 #ifdef MOMO_HAS_DEDUCTION_GUIDES
201 template<
typename Key,
typename Allocator,
typename HashFunc,
202 typename EqualFunc = std::equal_to<Key>,
203 typename = decltype(std::declval<Allocator&>().allocate(
size_t{})),
204 typename = decltype(std::declval<HashFunc&>()(std::declval<const Key&>())),
205 typename = decltype(std::declval<EqualFunc&>()(std::declval<const Key&>(),
206 std::declval<const Key&>()))>
207 class unordered_checker
211 template<
typename Key,
typename Allocator,
212 typename LessFunc = std::less<Key>,
213 typename = decltype(std::declval<Allocator&>().allocate(
size_t{})),
214 typename = decltype(std::declval<LessFunc&>()(std::declval<const Key&>(),
215 std::declval<const Key&>()))>
216 class ordered_checker
219 #endif // MOMO_HAS_DEDUCTION_GUIDES
226 #endif // MOMO_INCLUDE_GUARD_STDISH_SET_MAP_UTILITY
SetExtractedItem::Item value_type
Definition: set_map_utility.h:38
momo::stdish::map is similar to std::map, but much more efficient in memory usage....
Definition: map.h:837
SetExtractedItem & ptGetExtractedItem() noexcept
Definition: set_map_utility.h:92
map_node_handle(map_node_handle &&node) noexcept(std::is_nothrow_move_constructible< MapExtractedPair >::value)
Definition: set_map_utility.h:126
const mapped_type & mapped() const
Definition: set_map_utility.h:167
Definition: set_map_utility.h:194
map_node_handle(Map &map, typename Map::const_iterator iter)
Definition: set_map_utility.h:135
set_node_handle & operator=(const set_node_handle &)=delete
set_node_handle(Set &set, typename Set::const_iterator iter)
Definition: set_map_utility.h:55
momo::stdish::set is similar to std::set, but much more efficient in memory usage....
Definition: set.h:58
MOMO_NODISCARD bool empty() const noexcept
Definition: set_map_utility.h:147
MapExtractedPair & ptGetExtractedPair() noexcept
Definition: set_map_utility.h:183
map_node_handle(const map_node_handle &)=delete
TMapExtractedPair MapExtractedPair
Definition: set_map_utility.h:105
NodeHandle node
Definition: set_map_utility.h:197
Definition: set_map_utility.h:103
map_node_handle & operator=(const map_node_handle &)=delete
value_type & value()
Definition: set_map_utility.h:81
set_node_handle() noexcept
Definition: set_map_utility.h:42
bool inserted
Definition: set_map_utility.h:196
MapExtractedPair::Key key_type
Definition: set_map_utility.h:108
TSetExtractedItem SetExtractedItem
Definition: set_map_utility.h:35
MOMO_NODISCARD bool empty() const noexcept
Definition: set_map_utility.h:66
Definition: ArrayUtility.h:308
const value_type & value() const
Definition: set_map_utility.h:76
MapExtractedPair::Value mapped_type
Definition: set_map_utility.h:109
~set_node_handle()=default
const key_type & key() const
Definition: set_map_utility.h:157
Definition: set_map_utility.h:33
Iterator position
Definition: set_map_utility.h:195
mapped_type & mapped()
Definition: set_map_utility.h:172
set_node_handle(set_node_handle &&node) noexcept(std::is_nothrow_move_constructible< SetExtractedItem >::value)
Definition: set_map_utility.h:46
map_node_handle() noexcept
Definition: set_map_utility.h:122
#define MOMO_DECLARE_PROXY_FUNCTION(Object, Func, Result)
Definition: Utility.h:116
set_node_handle(const set_node_handle &)=delete
#define MOMO_NODISCARD
Definition: UserSettings.h:203
key_type & key()
Definition: set_map_utility.h:162
~map_node_handle()=default