Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Construction

Description

The TR1 Tuple type provides a default constructor, a constructor that takes initializers for all of its elements, a copy constructor, and a converting copy constructor. The details of the various constructors are described in this section.

Specification

Notation

T1 ... TN, U1 ... UN

Tuple element types

P1 ... PN

Parameter types

Ti, Ui

The type of the ith element of a tuple

Pi

The type of the ith parameter

tuple();

Requirements: Each Ti is default-constructible.

Semantics: Default initializes each element of the tuple.

tuple(P1,P2,...,PN);

Requirements: Each Pi is Ti if Ti is a reference type, const Ti& otherwise.

Semantics: Copy initializes each element with the corresponding parameter.

tuple(const tuple& t);

Requirements: Each Ti should be copy-constructible.

Semantics: Copy constructs each element of *this with the corresponding element of t.

template<typename U1, typename U2, ..., typename UN>
tuple(const tuple<U1, U2, ..., UN>& t);

Requirements: Each Ti shall be constructible from the corresponding Ui.

Semantics: Constructs each element of *this with the corresponding element of t.


PrevUpHomeNext