pair< T1, T2 >

pair< T1, T2 >#

stdgpu: stdgpu::pair< T1, T2 >
stdgpu Latest
Efficient STL-like Data Structures on the GPU

Detailed Description

template<typename T1, typename T2>
struct stdgpu::pair< T1, T2 >

A pair of two values of potentially different types.

Template Parameters
T1The type of the first value
T2The type of the second value

Public Types

using first_type = T1
 
using second_type = T2
 

Public Member Functions

template<STDGPU_DETAIL_OVERLOAD_IF(std::is_default_constructible_v< T1 > &&std::is_default_constructible_v< T2 >) >
constexpr STDGPU_HOST_DEVICE pair ()
 
 pair (const pair &p)=default
 
template<class U1 , class U2 , STDGPU_DETAIL_OVERLOAD_IF(std::is_constructible_v< T1, U1 > &&std::is_constructible_v< T2, U2 >) >
constexpr STDGPU_HOST_DEVICE pair (const pair< U1, U2 > &&p)
 
template<typename U1 , typename U2 , STDGPU_DETAIL_OVERLOAD_IF(std::is_constructible_v< T1, const U1 & > &&std::is_constructible_v< T2, const U2 & >) >
constexpr STDGPU_HOST_DEVICE pair (const pair< U1, U2 > &p)
 
template<STDGPU_DETAIL_OVERLOAD_IF(std::is_copy_constructible_v< T1 > &&std::is_copy_constructible_v< T2 >) >
constexpr STDGPU_HOST_DEVICE pair (const T1 &x, const T2 &y)
 
 pair (pair &&p)=default
 
template<class U1 , class U2 , STDGPU_DETAIL_OVERLOAD_IF(std::is_constructible_v< T1, U1 > &&std::is_constructible_v< T2, U2 >) >
constexpr STDGPU_HOST_DEVICE pair (pair< U1, U2 > &&p)
 
template<typename U1 , typename U2 , STDGPU_DETAIL_OVERLOAD_IF(std::is_constructible_v< T1, U1 & > &&std::is_constructible_v< T2, U2 & >) >
constexpr STDGPU_HOST_DEVICE pair (pair< U1, U2 > &p)
 
template<class U1 = T1, class U2 = T2, STDGPU_DETAIL_OVERLOAD_IF(std::is_constructible_v< T1, U1 > &&std::is_constructible_v< T2, U2 >) >
constexpr STDGPU_HOST_DEVICE pair (U1 &&x, U2 &&y)
 
 ~pair ()=default
 
pairoperator= (const pair &p)=default
 
template<class U1 , class U2 , STDGPU_DETAIL_OVERLOAD_IF(std::is_assignable_v< T1 &, const U1 & > &&std::is_assignable_v< T2 &, const U2 & >) >
constexpr STDGPU_HOST_DEVICE pairoperator= (const pair< U1, U2 > &p)
 
pairoperator= (pair &&p)=default
 
template<class U1 , class U2 , STDGPU_DETAIL_OVERLOAD_IF(std::is_assignable_v< T1 &, U1 > &&std::is_assignable_v< T2 &, U2 >) >
constexpr STDGPU_HOST_DEVICE pairoperator= (pair< U1, U2 > &&p)
 

Public Attributes

first_type first
 
second_type second