util::refpair< T, U > Class Template Reference

Class used to hold references for the util::tie() function. More...

#include <util/tie.h>

List of all members.

Public Types

typedef T first_type
typedef U second_type

Public Member Functions

refpairoperator= (std::pair< first_type, second_type > const &p)
 Assign the values of p to the references in this pair.
 refpair (refpair const &rp)
 Construct a copy.
 refpair (T &x, U &y)
 Construct a pair of references to x and y.

Public Attributes

T & first
 The first member of the pair.
U & second
 The second member of the pair.

Detailed Description

template<typename T, typename U>
class util::refpair< T, U >

Class used to hold references for the util::tie() function.

Definition at line 24 of file tie.h.


Constructor & Destructor Documentation

template<typename T, typename U>
util::refpair< T, U >::refpair ( T &  x,
U &  y 
) [inline]

Construct a pair of references to x and y.

Definition at line 30 of file tie.h.

00030 : first(x), second(y) {}

template<typename T, typename U>
util::refpair< T, U >::refpair ( refpair< T, U > const &  rp  )  [inline]

Construct a copy.

Definition at line 32 of file tie.h.

00032 : first(rp.first), second(rp.second) {}


Member Function Documentation

template<typename T, typename U>
refpair& util::refpair< T, U >::operator= ( std::pair< first_type, second_type > const &  p  )  [inline]

Assign the values of p to the references in this pair.

Definition at line 37 of file tie.h.

References util::refpair< T, U >::first, and util::refpair< T, U >::second.

00038       {
00039         first = p.first;
00040         second = p.second;
00041         return *this;
00042       }


Member Data Documentation

template<typename T, typename U>
T& util::refpair< T, U >::first

The first member of the pair.

Definition at line 54 of file tie.h.

Referenced by util::refpair< T, U >::operator=().

template<typename T, typename U>
U& util::refpair< T, U >::second

The second member of the pair.

Definition at line 56 of file tie.h.

Referenced by util::refpair< T, U >::operator=().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Fri May 31 15:38:35 2013 for VVE by  doxygen 1.6.3