Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

TLDefaultOperators_Relational2< T, T2 > Struct Template Reference

Relational operator template. More...

#include <defop.h>

List of all members.

Static Public Member Functions

bool lt (T const &a, T2 const &b)
bool le (T const &a, T2 const &b)
bool gt (T const &a, T2 const &b)
bool ge (T const &a, T2 const &b)
bool eq (T const &a, T2 const &b)
bool ne (T const &a, T2 const &b)


Detailed Description

template<typename T, typename T2>
struct TLDefaultOperators_Relational2< T, T2 >

Relational operator template.

Author:
Wolfgang Wieser ] wwieser (a) gmx <*> de [
This is like TLDefaultOperators_Relational but with the second operand explicitly specified as template argument.

Definition at line 66 of file defop.h.


Member Function Documentation

template<typename T, typename T2>
bool TLDefaultOperators_Relational2< T, T2 >::eq T const &  a,
T2 const &  b
[inline, static]
 

Definition at line 82 of file defop.h.

template<typename T, typename T2>
bool TLDefaultOperators_Relational2< T, T2 >::ge T const &  a,
T2 const &  b
[inline, static]
 

Definition at line 81 of file defop.h.

template<typename T, typename T2>
bool TLDefaultOperators_Relational2< T, T2 >::gt T const &  a,
T2 const &  b
[inline, static]
 

Definition at line 80 of file defop.h.

template<typename T, typename T2>
bool TLDefaultOperators_Relational2< T, T2 >::le T const &  a,
T2 const &  b
[inline, static]
 

Definition at line 79 of file defop.h.

template<typename T, typename T2>
bool TLDefaultOperators_Relational2< T, T2 >::lt T const &  a,
T2 const &  b
[inline, static]
 

Relational operators. Only smaller and smaller/equal would be needed but in order to allow comparisons between different types, I also introduced greater and greater/equal since it is then possible to have the _other_ type as second argument always. This is useful for searching when the _other_ type is the key and the primary type is the node (T) and we only want to implement relational operators as member. (Simply define operator<(const KEY &), etc; no need to have operator<(KEY,T)!) There is a euqal and non-equal version since using !(a==b) instead of a!=b may be inefficient for some types.

Definition at line 78 of file defop.h.

template<typename T, typename T2>
bool TLDefaultOperators_Relational2< T, T2 >::ne T const &  a,
T2 const &  b
[inline, static]
 

Definition at line 83 of file defop.h.


The documentation for this struct was generated from the following file:
Generated on Sat Feb 19 22:35:50 2005 for Ray by doxygen 1.3.5