Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
mundy::tuple< Elements > Struct Template Reference

A simple std::tuple-like class that can be used in device code with similar sementics to std::tuple (e.g., get<N>(), get<T>(), tuple_cat, etc.). All elements must be copyable but not necessarily moveable or default constructible. The tuple itself is copyable, moveable, and default constructible if all of its elements are copyable, moveable, and default constructible (respectively).

#include <tuple.hpp>

Inheritance diagram for mundy::tuple< Elements >:
[legend]

Public Types

template<size_t N>
using element_t = type_at_index_t<N, Elements...>
 Get the type of the N'th element.

Public Member Functions

constexpr tuple ()=default
 Default constructor. Only valid if all elements are default constructible.
constexpr tuple (Elements... vals)
 Constructor that takes a set of values. Only valid if all elements are copy constructible.
constexpr tuple (const tuple &)=default
 Default copy/move/assign constructors.
constexpr tuple (tuple &&)=default
constexpr tupleoperator= (const tuple &)=default
constexpr tupleoperator= (tuple &&)=default

Static Public Member Functions

static constexpr size_t size ()
 Get the size of the tuple.

Member Typedef Documentation

◆ element_t

template<class... Elements>
template<size_t N>
using mundy::tuple< Elements >::element_t = type_at_index_t<N, Elements...>

Constructor & Destructor Documentation

◆ tuple() [1/4]

template<class... Elements>
mundy::tuple< Elements >::tuple ( )
constexprdefault

◆ tuple() [2/4]

template<class... Elements>
mundy::tuple< Elements >::tuple ( Elements... vals)
inlineconstexpr

◆ tuple() [3/4]

template<class... Elements>
mundy::tuple< Elements >::tuple ( const tuple< Elements > & )
constexprdefault

◆ tuple() [4/4]

template<class... Elements>
mundy::tuple< Elements >::tuple ( tuple< Elements > && )
constexprdefault

Member Function Documentation

◆ operator=() [1/2]

template<class... Elements>
tuple & mundy::tuple< Elements >::operator= ( const tuple< Elements > & )
constexprdefault

◆ operator=() [2/2]

template<class... Elements>
tuple & mundy::tuple< Elements >::operator= ( tuple< Elements > && )
constexprdefault

◆ size()

template<class... Elements>
constexpr size_t mundy::tuple< Elements >::size ( )
inlinestaticconstexpr