Public Member Functions | Private Attributes | List of all members
art::SortInvalidFirst< T > Class Template Reference

#include <SortInvalidFirst.h>

Inheritance diagram for art::SortInvalidFirst< T >:

Public Member Functions

 SortInvalidFirst ()=default
 
constexpr SortInvalidFirst (T const &invalidValue)
 
constexpr bool operator() (T const &left, T const &right) const
 

Private Attributes

invalidValue_ {}
 

Detailed Description

template<typename T>
class art::SortInvalidFirst< T >

Definition at line 8 of file SortInvalidFirst.h.

Constructor & Destructor Documentation

template<typename T>
art::SortInvalidFirst< T >::SortInvalidFirst ( )
default
template<typename T>
constexpr art::SortInvalidFirst< T >::SortInvalidFirst ( T const &  invalidValue)
inlineexplicit

Definition at line 15 of file SortInvalidFirst.h.

16  : invalidValue_{invalidValue}
17  {}

Member Function Documentation

template<typename T>
constexpr bool art::SortInvalidFirst< T >::operator() ( T const &  left,
T const &  right 
) const
inline

Definition at line 19 of file SortInvalidFirst.h.

20  {
21  if (left == invalidValue_ && right != invalidValue_) {
22  return true;
23  } else if (right == invalidValue_ && left != invalidValue_) {
24  return false;
25  } else {
26  return left < right;
27  }
28  }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:102
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:94

Member Data Documentation

template<typename T>
T art::SortInvalidFirst< T >::invalidValue_ {}
private

Definition at line 31 of file SortInvalidFirst.h.


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