rocPRIM
Classes | Public Member Functions | Friends | List of all members
tuple< Types > Class Template Reference

Fixed-size collection of heterogeneous values. More...

#include <tuple.hpp>

Public Member Functions

template<class Dummy = void, typename = typename std::enable_if< check_constructor<Dummy>::template enable_default<Types...>() >::type>
ROCPRIM_HOST_DEVICE constexpr tuple () noexcept
 Default constructor. More...
 
ROCPRIM_HOST_DEVICE tuple (const tuple &)=default
 Implicitly-defined copy constructor.
 
ROCPRIM_HOST_DEVICE tuple (tuple &&)=default
 Implicitly-defined move constructor.
 
template<class Dummy = void, typename = typename std::enable_if< check_constructor<Dummy>::template enable_copy<Types...>() >::type>
ROCPRIM_HOST_DEVICE tuple (const Types &... values)
 Direct constructor. More...
 
template<class T , typename = typename std::enable_if< std::is_assignable<base_type&, T>::value >::type>
ROCPRIM_HOST_DEVICE tupleoperator= (T &&v) noexcept
 
ROCPRIM_HOST_DEVICE tupleoperator= (const tuple &other) noexcept
 
ROCPRIM_HOST_DEVICE void swap (tuple &other) noexcept
 Swaps the content of the tuple (*this) with the content other. More...
 

Friends

template<size_t I, class... UTypes>
ROCPRIM_HOST_DEVICE friend const tuple_element_t< I, tuple< UTypes... > > & get (const tuple< UTypes... > &) noexcept
 
template<size_t I, class... UTypes>
ROCPRIM_HOST_DEVICE friend tuple_element_t< I, tuple< UTypes... > > & get (tuple< UTypes... > &) noexcept
 
template<size_t I, class... UTypes>
ROCPRIM_HOST_DEVICE friend tuple_element_t< I, tuple< UTypes... > > && get (tuple< UTypes... > &&) noexcept
 

Detailed Description

template<class... Types>
class tuple< Types >

Fixed-size collection of heterogeneous values.

Template Parameters
Types...the types (zero or more) of the elements that the tuple stores.
Precondition
  • For all types in Types... following operations should not throw exceptions: construction, copy and move assignment, and swapping.
See also
std::tuple

Constructor & Destructor Documentation

◆ tuple() [1/2]

template<class... Types>
template<class Dummy = void, typename = typename std::enable_if< check_constructor<Dummy>::template enable_default<Types...>() >::type>
ROCPRIM_HOST_DEVICE constexpr tuple< Types >::tuple ( )
inlinenoexcept

Default constructor.

Performs value-initialization of all elements.

This overload only participates in overload resolution if:

  • std::is_default_constructible<Ti>::value is true for all i.

◆ tuple() [2/2]

template<class... Types>
template<class Dummy = void, typename = typename std::enable_if< check_constructor<Dummy>::template enable_copy<Types...>() >::type>
ROCPRIM_HOST_DEVICE tuple< Types >::tuple ( const Types &...  values)
inlineexplicit

Direct constructor.

Initializes each element of the tuple with the corresponding input value.

This overload only participates in overload resolution if:

  • std::is_copy_constructible<Ti>::value is true for all i.

Member Function Documentation

◆ swap()

template<class... Types>
ROCPRIM_HOST_DEVICE void tuple< Types >::swap ( tuple< Types > &  other)
inlinenoexcept

Swaps the content of the tuple (*this) with the content other.

Parameters
othertuple of values to swap

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