datastructures 0.1.0
Loading...
Searching...
No Matches
datastructures::map< TKey, TValue, TKeyComp, TAlloc >::value_compare Struct Reference

#include <map.hpp>

Public Member Functions

 value_compare (key_compare c)
 
bool operator() (const value_type &a, const value_type &b) const noexcept
 
bool operator() (const key_type &a, const value_type &b) const noexcept
 
bool operator() (const value_type &a, const key_type &b) const noexcept
 
bool operator() (const key_type &a, const key_type &b) const noexcept
 

Protected Attributes

key_compare comp
 

Friends

class map
 

Detailed Description

template<class TKey, class TValue, class TKeyComp = std::less<TKey>, class TAlloc = std::allocator<std::pair<const TKey, TValue>>>
struct datastructures::map< TKey, TValue, TKeyComp, TAlloc >::value_compare

A helper struct to compare keys and values.

It will compare the .first values from the pairs, also provides the comparisons for cross comparisons, because the avl_tree requires it.

Constructor & Destructor Documentation

◆ value_compare()

template<class TKey , class TValue , class TKeyComp = std::less<TKey>, class TAlloc = std::allocator<std::pair<const TKey, TValue>>>
datastructures::map< TKey, TValue, TKeyComp, TAlloc >::value_compare::value_compare ( key_compare  c)
inline

Member Function Documentation

◆ operator()() [1/4]

template<class TKey , class TValue , class TKeyComp = std::less<TKey>, class TAlloc = std::allocator<std::pair<const TKey, TValue>>>
bool datastructures::map< TKey, TValue, TKeyComp, TAlloc >::value_compare::operator() ( const key_type &  a,
const key_type &  b 
) const
inlinenoexcept

◆ operator()() [2/4]

template<class TKey , class TValue , class TKeyComp = std::less<TKey>, class TAlloc = std::allocator<std::pair<const TKey, TValue>>>
bool datastructures::map< TKey, TValue, TKeyComp, TAlloc >::value_compare::operator() ( const key_type &  a,
const value_type &  b 
) const
inlinenoexcept

◆ operator()() [3/4]

template<class TKey , class TValue , class TKeyComp = std::less<TKey>, class TAlloc = std::allocator<std::pair<const TKey, TValue>>>
bool datastructures::map< TKey, TValue, TKeyComp, TAlloc >::value_compare::operator() ( const value_type &  a,
const key_type &  b 
) const
inlinenoexcept

◆ operator()() [4/4]

template<class TKey , class TValue , class TKeyComp = std::less<TKey>, class TAlloc = std::allocator<std::pair<const TKey, TValue>>>
bool datastructures::map< TKey, TValue, TKeyComp, TAlloc >::value_compare::operator() ( const value_type &  a,
const value_type &  b 
) const
inlinenoexcept

Friends And Related Symbol Documentation

◆ map

template<class TKey , class TValue , class TKeyComp = std::less<TKey>, class TAlloc = std::allocator<std::pair<const TKey, TValue>>>
friend class map
friend

Member Data Documentation

◆ comp

template<class TKey , class TValue , class TKeyComp = std::less<TKey>, class TAlloc = std::allocator<std::pair<const TKey, TValue>>>
key_compare datastructures::map< TKey, TValue, TKeyComp, TAlloc >::value_compare::comp
protected

The documentation for this struct was generated from the following file: