faunus
Public Types | Public Member Functions | List of all members
Faunus::ordered_pair< T > Struct Template Reference

Ordered pair where first<=second More...

#include <auxiliary.h>

Inheritance diagram for Faunus::ordered_pair< T >:
Inheritance graph
[legend]
Collaboration diagram for Faunus::ordered_pair< T >:
Collaboration graph
[legend]

Public Types

using base = std::pair< T, T >
 

Public Member Functions

 ordered_pair (const T &a, const T &b)
 
bool contains (const T &value) const
 

Detailed Description

template<class T>
struct Faunus::ordered_pair< T >

Ordered pair where first<=second

Upon construction, the smallest element is placed in first so that ordered_pair<int>(i,j)==ordered_pair<int>(j,i) is always true.

Todo:
Add std::pair copy operator

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