Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Dft_Pair_Cmp< Key, Data, Cmp > Struct Template Reference

Default comparator for pair types in hash maps. More...

#include <ahDry.H>

Inheritance diagram for Aleph::Dft_Pair_Cmp< Key, Data, Cmp >:
[legend]

Public Member Functions

 Dft_Pair_Cmp (Cmp __cmp=Cmp())
 
bool operator() (const std::pair< Key, Data > &p1, const std::pair< Key, Data > &p2) const noexcept
 Pair vs Pair comparison.
 
bool operator() (const std::pair< Key, Data > &p, const Key &k) const noexcept
 Heterogeneous: Pair vs Key.
 
bool operator() (const Key &k, const std::pair< Key, Data > &p) const noexcept
 Heterogeneous: Key vs Pair.
 

Public Attributes

Cmp cmp
 

Detailed Description

template<typename Key, typename Data, class Cmp = std::equal_to<Key>>
struct Aleph::Dft_Pair_Cmp< Key, Data, Cmp >

Default comparator for pair types in hash maps.

Wraps a key comparator to work with std::pair<Key, Data>. Supports heterogeneous comparison (Pair vs Key).

Template Parameters
KeyKey type
DataData type
CmpKey comparator (default: std::equal_to<Key>)

Definition at line 189 of file ahDry.H.

Constructor & Destructor Documentation

◆ Dft_Pair_Cmp()

template<typename Key , typename Data , class Cmp = std::equal_to<Key>>
Aleph::Dft_Pair_Cmp< Key, Data, Cmp >::Dft_Pair_Cmp ( Cmp  __cmp = Cmp())
inline

Definition at line 192 of file ahDry.H.

Member Function Documentation

◆ operator()() [1/3]

template<typename Key , typename Data , class Cmp = std::equal_to<Key>>
bool Aleph::Dft_Pair_Cmp< Key, Data, Cmp >::operator() ( const Key &  k,
const std::pair< Key, Data > &  p 
) const
inlinenoexcept

Heterogeneous: Key vs Pair.

Definition at line 209 of file ahDry.H.

References Aleph::Dft_Pair_Cmp< Key, Data, Cmp >::cmp, and Aleph::maps().

◆ operator()() [2/3]

template<typename Key , typename Data , class Cmp = std::equal_to<Key>>
bool Aleph::Dft_Pair_Cmp< Key, Data, Cmp >::operator() ( const std::pair< Key, Data > &  p,
const Key &  k 
) const
inlinenoexcept

Heterogeneous: Pair vs Key.

Definition at line 202 of file ahDry.H.

References Aleph::Dft_Pair_Cmp< Key, Data, Cmp >::cmp, and Aleph::maps().

◆ operator()() [3/3]

template<typename Key , typename Data , class Cmp = std::equal_to<Key>>
bool Aleph::Dft_Pair_Cmp< Key, Data, Cmp >::operator() ( const std::pair< Key, Data > &  p1,
const std::pair< Key, Data > &  p2 
) const
inlinenoexcept

Pair vs Pair comparison.

Definition at line 195 of file ahDry.H.

References Aleph::Dft_Pair_Cmp< Key, Data, Cmp >::cmp.

Member Data Documentation

◆ cmp


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