|
tgen
|
Pair value. More...

Public Member Functions | |
| value (const std::pair< T, T > &pair) | |
| Creates a pair value from a std::pair. | |
| value (const T &first, const T &second) | |
| Creates a pair value from first and second values. | |
| T | first () const |
| Returns the first element of a pair value. | |
| T | second () const |
| Returns the second element of a pair value. | |
| value & | separator (char sep) |
| Sets separator for printing. | |
| auto | to_std () const |
| Converts the pair to a std::pair. | |
| Public Member Functions inherited from tgen::gen_value_base< value > | |
| bool | operator< (const value &rhs) const |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const value &val) |
| Prints the pair to an output stream. | |
Pair value.
It can be deterministically operated upon and printed through std::cout.
|
inline |
Creates a pair value from a std::pair.
| pair | The std::pair representing the pair. |
|
inline |
Creates a pair value from first and second values.
| first | First element of the pair. |
| second | Second element of the pair. |
|
inline |
Returns the first element of a pair value.
|
inline |
Returns the second element of a pair value.
|
inline |
Sets separator for printing.
O(1).
|
inline |
Converts the pair to a std::pair.
to_std() is called recursevely on type T, if it applies.
|
friend |