KSS Utility
C++ general utilities
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
kss::util::AddRelOps< T > Struct Template Reference

Add the operators !=, <=, > and >= assuming the existance of == and <. More...

#include <add_rel_ops.hpp>

Public Member Functions

bool operator!= (const T &t) const noexcept
 
bool operator<= (const T &t) const noexcept
 
bool operator> (const T &t) const noexcept
 
bool operator>= (const T &t) const noexcept
 

Detailed Description

template<class T>
struct kss::util::AddRelOps< T >

Add the operators !=, <=, > and >= assuming the existance of == and <.

By subclassing your type T from add_rel_ops<T> this will add the "missing" operators provided that T defines operator== and operator<.

This is similar to "using namespace rel_ops;" but does not have the potential side effects of adding a namespace.

Definition at line 31 of file add_rel_ops.hpp.

Member Function Documentation

template<class T>
bool kss::util::AddRelOps< T >::operator!= ( const T &  t) const
inlinenoexcept

Definition at line 32 of file add_rel_ops.hpp.

template<class T>
bool kss::util::AddRelOps< T >::operator<= ( const T &  t) const
inlinenoexcept

Definition at line 37 of file add_rel_ops.hpp.

template<class T>
bool kss::util::AddRelOps< T >::operator> ( const T &  t) const
inlinenoexcept

Definition at line 42 of file add_rel_ops.hpp.

template<class T>
bool kss::util::AddRelOps< T >::operator>= ( const T &  t) const
inlinenoexcept

Definition at line 47 of file add_rel_ops.hpp.


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