47template <
typename T,
typename R,
typename Cmp = std::less < >,
typename Alloc = std::allocator < std::pair < const T, R > > >
48class multimap :
public std::multimap < T, R, Cmp, Alloc > {
53 using std::multimap< T, R, Cmp, Alloc >::multimap;
58 using std::multimap< T, R, Cmp, Alloc >::operator =;
93 template <
class Iterator >
101 using iterator =
typename std::multimap<T, R, Cmp, Alloc>::iterator;
107 using std::multimap< T, R, Cmp, Alloc >::insert;
188 return make_map_move_iterator < T, R > ( this->
begin ( ) );
218 return make_map_move_iterator < T, R > ( this->
end ( ) );
228 auto endIter =
end ( );
229 auto beginIter =
begin ( );
240 auto endIter =
end ( );
241 auto beginIter =
begin ( );
252 auto endIter = std::move ( * this ).end ( );
253 auto beginIter = std::move ( * this ).begin ( );
269 auto range = std::multimap < T, R, Cmp, Alloc >::equal_range ( std::forward < K > ( key ) );
285 auto range = std::multimap < T, R, Cmp, Alloc >::equal_range ( std::forward < K > ( key ) );
301 auto range = std::multimap < T, R, Cmp, Alloc >::equal_range ( std::forward < K > ( key ) );
320template<
class T,
class R,
class ... Ts >
325 for(
const std::pair<const T, R>& item :
multimap) {
326 if(!first) out <<
", ";
328 out <<
"(" << item.first <<
", " << item.second <<
")";
Implementation of iterator_range, i.e. pair of iterators. The class provides most notably begin and e...
Definition: range.hpp:24
Class extending the multimap class from the standard library. Original reason is to allow printing of...
Definition: multimap.hpp:48
auto range() const &
Make range of non-const begin to end iterators.
Definition: multimap.hpp:239
auto begin() const &
Inherited behavior of begin for const instance.
Definition: multimap.hpp:177
auto end() &&
New variant of end for rvalues.
Definition: multimap.hpp:217
multimap & operator=(multimap &&other)=default
auto begin() &
Inherited behavior of begin for non-const instance.
Definition: multimap.hpp:167
multimap(const multimap &other)=default
auto range() &
Make range of non-const begin to end iterators.
Definition: multimap.hpp:227
auto end() const &
Inherited behavior of end for const instance.
Definition: multimap.hpp:207
typename std::multimap< T, R, Cmp, Alloc >::iterator iterator
The iterator type is inheried.
Definition: multimap.hpp:101
multimap(const ext::iterator_range< Iterator > &range)
Definition: multimap.hpp:94
iterator insert(T &&key, const R &value)
Insert variant with explicit key and value parameters.
Definition: multimap.hpp:144
iterator insert(const T &key, const R &value)
Insert variant with explicit key and value parameters.
Definition: multimap.hpp:118
auto range() &&
Make range of move begin to end iterators.
Definition: multimap.hpp:251
auto begin() &&
New variant of begin for rvalues.
Definition: multimap.hpp:187
multimap(multimap &&other)=default
auto equal_range(K &&key) &
Make range of elements with key equal to the key.
Definition: multimap.hpp:284
auto equal_range(K &&key) &&
Make range of elements with key equal to the key.
Definition: multimap.hpp:300
auto end() &
Inherited behavior of end for non-const instance.
Definition: multimap.hpp:197
iterator insert(T &&key, R &&value)
Insert variant with explicit key and value parameters.
Definition: multimap.hpp:157
auto equal_range(K &&key) const &
Make range of elements with key equal to the key.
Definition: multimap.hpp:268
iterator insert(const T &key, R &&value)
Insert variant with explicit key and value parameters.
Definition: multimap.hpp:131
Definition: sigHandler.cpp:20
iterator_range< Iter > make_iterator_range(Iter begin, Iter end)
Helper to create iterator_range from two iterators.
Definition: range.hpp:235
constexpr auto make_pair(T1 &&x, T2 &&y)
Definition: pair.hpp:79
std::ostream & operator<<(ext::reference_wrapper< std::ostream > &os, std::ostream &(*const func)(std::ostream &))
Overloaded function allowing same operations on wrapped output stream as on the actual output stream,...
Definition: GlobalData.cpp:33
auto begin(Container &&cont) -> decltype(std::forward(cont).begin())
Definition: iterator.hpp:900
void end()
Definition: measurements.cpp:19