Bolt  1.3
C++ template library with support for OpenCL
Public Types | Public Member Functions | Public Attributes | List of all members
bolt::cl::pair< T1, T2 > Struct Template Reference

#include <pair.h>

Public Types

typedef T1 first_type
 
typedef T2 second_type
 

Public Member Functions

 pair (void)
 
 pair (const T1 &x, const T2 &y)
 
template<typename U1 , typename U2 >
 pair (const pair< U1, U2 > &p)
 
template<typename U1 , typename U2 >
 pair (const std::pair< U1, U2 > &p)
 

Public Attributes

first_type first
 
second_type second
 

Detailed Description

template<typename T1, typename T2>
struct bolt::cl::pair< T1, T2 >

pair is a generic data structure encapsulating a heterogeneous pair of values.

Template Parameters
T1The type of pair's first object type. There are no requirements on the type of T1. T1's type is provided by pair::first_type.
T2The type of pair's second object type. There are no requirements on the type of T2. T2's type is provided by pair::second_type.

Member Typedef Documentation

template<typename T1, typename T2>
typedef T1 bolt::cl::pair< T1, T2 >::first_type

first_type is pair's first object type.

template<typename T1, typename T2>
typedef T2 bolt::cl::pair< T1, T2 >::second_type

second_type is pair's second object type.

Constructor & Destructor Documentation

template<typename T1 , typename T2 >
bolt::cl::pair< T1, T2 >::pair ( void  )

pair's default constructor constructs first and second using first_type & second_type's default constructors, respectively.

template<typename T1 , typename T2 >
bolt::cl::pair< T1, T2 >::pair ( const T1 &  x,
const T2 &  y 
)

This constructor accepts two objects to copy into this pair.

Parameters
xThe object to copy into first.
yThe object to copy into second.
template<typename T1 , typename T2 >
template<typename U1 , typename U2 >
bolt::cl::pair< T1, T2 >::pair ( const pair< U1, U2 > &  p)

This copy constructor copies from a pair whose types are convertible to this pair's first_type and second_type, respectively.

Parameters
pThe pair to copy from.
Template Parameters
U1is convertible to first_type.
U2is convertible to second_type.
template<typename T1 , typename T2 >
template<typename U1 , typename U2 >
bolt::cl::pair< T1, T2 >::pair ( const std::pair< U1, U2 > &  p)

This copy constructor copies from a std::pair whose types are convertible to this pair's first_type and second_type, respectively.

Parameters
pThe std::pair to copy from.
Template Parameters
U1is convertible to first_type.
U2is convertible to second_type.

Member Data Documentation

template<typename T1, typename T2>
first_type bolt::cl::pair< T1, T2 >::first

The pair's first object.

template<typename T1, typename T2>
second_type bolt::cl::pair< T1, T2 >::second

The pair's second object.


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