Public Types | Public Member Functions | List of all members
Tuple2 Class Reference

A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pair, but does not expose its members directly. More...

Inheritance diagram for Tuple2:
Inheritance graph
[legend]

Public Types

typedef T1 first_type
 
typedef T2 second_type
 

Public Member Functions

 Tuple2 ()=default
 
 Tuple2 (const T1 &f, const T2 &s)
 
 Tuple2 (T1 &&f, T2 &&s)
 
 Tuple2 (const std::pair< T1, T2 > &vals)
 
 Tuple2 (std::pair< T1, T2 > &&vals)
 
 Tuple2 (Istream &is)
 
const T1 & first () const noexcept
 
T1 & first () noexcept
 
const T2 & second () const noexcept
 
T2 & second () noexcept
 

Detailed Description

A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pair, but does not expose its members directly.

See also
Foam::Pair for storing two objects of identical types.

Definition at line 56 of file stringOps.H.

Member Typedef Documentation

◆ first_type

typedef T1 first_type

Definition at line 63 of file Tuple2.H.

◆ second_type

typedef T2 second_type

Definition at line 66 of file Tuple2.H.

Constructor & Destructor Documentation

◆ Tuple2() [1/6]

Tuple2 ( )
default

◆ Tuple2() [2/6]

Tuple2 ( const T1 &  f,
const T2 &  s 
)
inline

Definition at line 75 of file Tuple2.H.

◆ Tuple2() [3/6]

Tuple2 ( T1 &&  f,
T2 &&  s 
)
inline

Definition at line 82 of file Tuple2.H.

◆ Tuple2() [4/6]

Tuple2 ( const std::pair< T1, T2 > &  vals)
inline

Definition at line 89 of file Tuple2.H.

◆ Tuple2() [5/6]

Tuple2 ( std::pair< T1, T2 > &&  vals)
inline

Definition at line 96 of file Tuple2.H.

◆ Tuple2() [6/6]

Tuple2 ( Istream is)
inlineexplicit

Definition at line 103 of file Tuple2.H.

Member Function Documentation

◆ first() [1/2]

const T1& first ( ) const
inlinenoexcept

◆ first() [2/2]

T1& first ( )
inlinenoexcept

Definition at line 118 of file Tuple2.H.

◆ second() [1/2]

const T2& second ( ) const
inlinenoexcept

◆ second() [2/2]

T2& second ( )
inlinenoexcept

Definition at line 130 of file Tuple2.H.


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