LibSWOC++ 1.5.14
Solid Wall of C++
Loading...
Searching...
No Matches
swoc::DiscreteRange< T >::lexicographic_order Struct Reference

#include <DiscreteRange.h>

Collaboration diagram for swoc::DiscreteRange< T >::lexicographic_order:
Collaboration graph

Public Types

using first_argument_type = self_type
 
using second_argument_type = self_type
 
using result_type = bool
 

Public Member Functions

bool operator() (self_type const &lhs, self_type const &rhs) const
 Functor operator.
 

Detailed Description

template<typename T>
struct swoc::DiscreteRange< T >::lexicographic_order

Functor for lexicographic ordering. If, for some reason, an interval needs to be put in a container that requires a strict weak ordering, the default operator < will not work. Instead, this functor should be used as the comparison functor. E.g.

typedef std::set<Interval<T>, Interval<T>::lexicographic_order> container;
Note
Lexicographic ordering is a standard tuple ordering where the order is determined by pairwise comparing the elements of both tuples. The first pair of elements that are not equal determine the ordering of the overall tuples.

Definition at line 382 of file DiscreteRange.h.

Member Typedef Documentation

◆ first_argument_type

template<typename T>
using swoc::DiscreteRange< T >::lexicographic_order::first_argument_type = self_type

Definition at line 383 of file DiscreteRange.h.

◆ result_type

template<typename T>
using swoc::DiscreteRange< T >::lexicographic_order::result_type = bool

Definition at line 385 of file DiscreteRange.h.

◆ second_argument_type

template<typename T>
using swoc::DiscreteRange< T >::lexicographic_order::second_argument_type = self_type

Definition at line 384 of file DiscreteRange.h.

Member Function Documentation

◆ operator()()

template<typename T>
bool swoc::DiscreteRange< T >::lexicographic_order::operator() ( DiscreteRange::self_type const & lhs,
DiscreteRange::self_type const & rhs ) const

Functor operator.

Definition at line 437 of file DiscreteRange.h.


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