tuples.hh File Reference


Detailed Description

Contains classes that implement tuples.

This a refined implementation of the approach defined in in the article "Tuples and multiple return values in C++" of Jaakko Järvi (Turku Centre of Computer Science, TUCS Technical Report No 249, March 1999, ISBN 952-12-0401-X, ISSN 1239-1891) available from the TUCS publications archive

Author:
Markus Blatt

#include <ostream>
#include "typetraits.hh"
#include "helpertemplates.hh"

Go to the source code of this file.


Namespaces

namespace  Dune

Classes

struct  Dune::Nil
 An empty class. More...
struct  Dune::Pair< T1, TT >
 A tuple consisting of two objects. More...
struct  Dune::Pair< T1, Nil >
 A tuple consisting of one object. Specialization of Pair that really is a single value. More...
struct  Dune::TupleToPairs< T1, T2, T3, T4, T5, T6, T7, T8, T9 >
 Converts the Tuple to a list of pairs. More...
struct  Dune::TupleToPairs< T1, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil >
 Specialization for a tuple consisting only of one type. More...
class  Dune::Tuple< T1, T2, T3, T4, T5, T6, T7, T8, T9 >
 A Tuple of objects. More...
struct  Dune::ElementType< 0, Pair< T1, T2 > >
 Get the type of the first element of the tuple. More...
struct  Dune::Element< N >
 Get the N-th element of a tuple. More...
struct  Dune::Element< 0 >
 Get the first element of a tuple. More...

Functions

template<typename T1, typename T2, typename U1, typename U2>
bool Dune::operator== (const Pair< T1, T2 > &tuple1, const Pair< U1, U2 > &tuple2)
 Equality comparison operator for tuples.
template<typename T1, typename T2, typename U1, typename U2>
bool Dune::operator!= (const Pair< T1, T2 > &tuple1, const Pair< U1, U2 > &tuple2)
 Inequality comparison operator for tuples.
template<typename T1, typename T2, typename U1, typename U2>
bool Dune::operator< (const Pair< T1, T2 > &tuple1, const Pair< U1, U2 > &tuple2)
 Less operator for tuples.
template<typename T1, typename U1>
bool Dune::operator== (const Pair< T1, Nil > &tuple1, const Pair< U1, Nil > &tuple2)
 Equality comparison operator for tuples.
template<typename T1, typename U1>
bool Dune::operator!= (const Pair< T1, Nil > &tuple1, const Pair< U1, Nil > &tuple2)
 Inequality comparison operator for tuples.
template<typename T1, typename U1>
bool Dune::operator< (const Pair< T1, Nil > &tuple1, const Pair< U1, Nil > &tuple2)
 Less operator for tuples.
template<typename T1, typename U1, typename U2>
bool Dune::operator== (const Pair< T1, Nil > &tuple1, const Pair< U1, U2 > &tuple2)
 Equality comparison operator for tuples.
template<typename T1, typename U1, typename U2>
bool Dune::operator!= (const Pair< T1, Nil > &tuple1, const Pair< U1, U2 > &tuple2)
 Inequality comparison operator for tuples.
template<typename T1, typename T2, typename U1>
bool Dune::operator== (const Pair< T1, T2 > &tuple1, const Pair< U1, Nil > &tuple2)
 Equality comparison operator for tuples.
template<typename T1, typename T2, typename U1>
bool Dune::operator!= (const Pair< T1, T2 > &tuple1, const Pair< U1, Nil > &tuple2)
 Inequality comparison operator for tuples.
template<typename T1, typename T2>
Pair< T1, T2 > Dune::makePair (const T1 &first, const T2 &second)
 Create a tuple and initialize it.
template<typename T1, typename T2>
std::ostream & Dune::operator<< (std::ostream &os, const Pair< T1, T2 > &pair)
 Print a pair or tuple.

Generated on 12 Dec 2007 with Doxygen (ver 1.5.1)