hpx/datastructures/tuple.hpp#

See Public API for a list of names and headers that are part of the public HPX API.

namespace hpx

Top level HPX namespace.

Functions

template<typename ...Ts>
constexpr tuple<util::decay_unwrap_t<Ts>...> make_tuple(Ts&&... ts)#

Provides compile-time indexed access to the types of the elements of the tuple.

template<typename ...Ts>
constexpr tuple<Ts&&...> forward_as_tuple(Ts&&... ts)#

Constructs a tuple of references to the arguments in args suitable for forwarding as an argument to a function. The tuple has rvalue reference data members when rvalues are used as arguments, and otherwise has lvalue reference data members.

Parameters

ts – zero or more arguments to construct the tuple from

Returns

hpx::tuple object created as if by

hpx::tuple<Ts&&...>(HPX_FORWARD(Ts, ts)...) 

template<typename ...Ts>
constexpr tuple<Ts&...> tie(Ts&... ts)#

Creates a tuple of lvalue references to its arguments or instances of hpx::ignore.

Parameters

ts – zero or more lvalue arguments to construct the tuple from.

Returns

hpx::tuple object containing lvalue references.

template<typename ...Tuples>
constexpr auto tuple_cat(Tuples&&... tuples)#

Constructs a tuple that is a concatenation of all tuples in tuples. The behavior is undefined if any type in std::decay_t<Tuples>… is not a specialization of hpx::tuple. However, an implementation may choose to support types (such as std::array and std::pair) that follow the tuple-like protocol.

Parameters

tuples – - zero or more tuples to concatenate

Returns

hpx::tuple object composed of all elements of all argument tuples constructed from hpx::get<Is>(HPX_FORWARD(UTuple,t) for each individual element.

template<std::size_t I>
util::at_index<I, Ts...>::type &get() noexcept#

Extracts the Ith element from the tuple. I must be an integer value in [0, sizeof…(Ts)).

template<std::size_t I>
util::at_index<I, Ts...>::type const &get() const noexcept#

Extracts the Ith element from the tuple. I must be an integer value in [0, sizeof…(Ts)).

Variables

constexpr hpx::detail::ignore_type ignore = {}#

An object of unspecified type such that any value can be assigned to it with no effect. Intended for use with hpx::tie when unpacking a hpx::tuple, as a placeholder for the arguments that are not used. While the behavior of hpx::ignore outside of hpx::tie is not formally specified, some code guides recommend using hpx::ignore to avoid warnings from unused return values of [[nodiscard]] functions.

template<typename ...Ts>
class tuple#
#include <tuple.hpp>

Class template hpx::tuple is a fixed-size collection of heterogeneous values. It is a generalization of hpx::pair. If std::is_trivially_destructible<Ti>::value is true for every Ti in Ts, the destructor of tuple is trivial.

Param Ts…

the types of the elements that the tuple stores.

template<std::size_t I, typename T, typename Enable = void>
struct tuple_element#
#include <tuple.hpp>

Provides compile-time indexed access to the types of the elements of a tuple-like type.

The primary template is not defined. An explicit (full) or partial specialization is required to make a type tuple-like.

template<typename T>
struct tuple_size#
#include <tuple.hpp>

Provides access to the number of elements in a tuple-like type as a compile-time constant expression.

The primary template is not defined. An explicit (full) or partial specialization is required to make a type tuple-like.