CASM  1.1.0
A Clusters Approach to Statistical Mechanics
notstd::Comparisons< Base > Struct Template Reference

#include <Comparisons.hh>

+ Inheritance diagram for notstd::Comparisons< Base >:

Detailed Description

template<typename Base>
struct notstd::Comparisons< Base >

Implements other comparisons in terms of '<'.

If

bool operator<(const ClexDescription &A, const ClexDescription &B)
Compare using name strings: A.name < B.name.
Base::MostDerived MostDerived
Definition: Comparisons.hh:27

is implemented, then Comparisons implements:

  • '>', '<=', '>=', '==', '!='
  • '==' and '!=' can be specialized in MostDerived by implementing private methods '_eq' and '_ne'

The MostDerived class definition needs to include:

template<typename T> friend class Comparisons;
notstd::Comparisons< Base > Comparisons
Definition: Comparisons.hh:51

Definition at line 25 of file Comparisons.hh.

Public Types

typedef Base::MostDerived MostDerived
 

Public Member Functions

bool operator> (const MostDerived &B) const
 
bool operator<= (const MostDerived &B) const
 
bool operator>= (const MostDerived &B) const
 
bool operator== (const MostDerived &B) const
 
bool operator!= (const MostDerived &B) const
 

Protected Member Functions

bool eq_impl (const MostDerived &B) const
 
bool ne_impl (const MostDerived &B) const
 

Member Typedef Documentation

◆ MostDerived

template<typename Base >
typedef Base::MostDerived notstd::Comparisons< Base >::MostDerived

Definition at line 27 of file Comparisons.hh.

Member Function Documentation

◆ eq_impl()

template<typename Base >
bool notstd::Comparisons< Base >::eq_impl ( const MostDerived B) const
inlineprotected

Definition at line 40 of file Comparisons.hh.

◆ ne_impl()

template<typename Base >
bool notstd::Comparisons< Base >::ne_impl ( const MostDerived B) const
inlineprotected

Definition at line 44 of file Comparisons.hh.

◆ operator!=()

template<typename Base >
bool notstd::Comparisons< Base >::operator!= ( const MostDerived B) const
inline

Definition at line 37 of file Comparisons.hh.

◆ operator<=()

template<typename Base >
bool notstd::Comparisons< Base >::operator<= ( const MostDerived B) const
inline

Definition at line 31 of file Comparisons.hh.

◆ operator==()

template<typename Base >
bool notstd::Comparisons< Base >::operator== ( const MostDerived B) const
inline

Definition at line 35 of file Comparisons.hh.

◆ operator>()

template<typename Base >
bool notstd::Comparisons< Base >::operator> ( const MostDerived B) const
inline

Definition at line 29 of file Comparisons.hh.

◆ operator>=()

template<typename Base >
bool notstd::Comparisons< Base >::operator>= ( const MostDerived B) const
inline

Definition at line 33 of file Comparisons.hh.


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