C++ Library - <tuple>



Introduction

It is an object capable to hold a collection of elements. Each element can be of a different type.

Declaration

Following is the declaration for std::tuple.

template <class... Types> class tuple;

C++11

template <class... Types> class tuple;

Parameters

Types... − List of types for the elements.

Member types

none

Member functions

Sr.No. Member function & description
1 (constructor)

It is a construct tuple.

2 tuple::operator=

It is a tuple operator.

3 tuple::swap

It swaps content.

Non-member function overloads

Sr.No. Non-member function overload & description
1 relational operators (tuple)

It contains relational operators for tuple.

2 swap (tuple)

It exchanges the contents of two tuples.

3 get (tuple)

It gets element.

Non-member class specializations

Sr.No. Non-member class specialization & description
1 uses_allocator

It uses allocator for tuple.

tuple.htm
Advertisements