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

extended_pair Struct Template Reference

#include <lemon/bits/extended_pair.h>

List of all members.


Detailed Description

template<typename T1, typename A1, typename T2, typename A2>
struct lemon::extended_pair< T1, A1, T2, A2 >

This type is a customizable pair type. The main goal is that the constructor's parameter type does not depend on the stored data type. This way it is possible to store references in the extended_pair.
      int a; char b;
      typedef extended_pair<int&, int&, char&, char&> ICPair;
      ICPair p(a, b); 
      // like a real reference to an std::pair<int, char>
      // but the pair does not exist
      p.first = 42;
      p.second = '@';
Parameters:
T1 The type of first.
A1 The parameter type for first.
T2 The type of second.
A2 The parameter type for second.


Public Types

typedef T1 first_type
 The type of first.
typedef T2 second_type
 The type of second.

Public Member Functions

 extended_pair ()
 Default constructor.
 extended_pair (A1 f, A2 s)
 Constructor.
template<class Pair>
 extended_pair (const Pair &pair)
 Template constructor.

Public Attributes

T1 first
 The first value.
T2 second
 The second value.


Member Typedef Documentation

typedef T1 first_type
 

The type of first.

typedef T2 second_type
 

The type of second.


Constructor & Destructor Documentation

extended_pair  )  [inline]
 

Default constructor. It calls the default constructor of first and second.

extended_pair A1  f,
A2  s
[inline]
 

Constructor.

extended_pair const Pair &  pair  )  [inline]
 

Template constructor. It copies everything which has first and second member.


Member Data Documentation

T1 first
 

The first value

T2 second
 

The second value


The documentation for this struct was generated from the following file:
Generated on Sat Aug 27 14:16:17 2005 for LEMON by  doxygen 1.4.4