Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
mundy::storage< T > Class Template Reference

Own or view a value using a simple normalized storage policy. More...

#include <storage.hpp>

Inheritance diagram for mundy::storage< T >:
[legend]

Public Types

using input_type = T
using stored_type = impl::storage_type_t<T>

Public Member Functions

constexpr storage ()=default
constexpr storage (const storage &)=default
constexpr storage (storage &&)=default
constexpr storageoperator= (const storage &)=default
constexpr storageoperator= (storage &&)=default
template<class U>
constexpr storage (U &&value) noexcept(std::is_nothrow_constructible_v< stored_type, decltype(impl::storage_get(std::declval< U && >()))>)
constexpr decltype(auto) get () noexcept
constexpr decltype(auto) get () const noexcept

Detailed Description

template<class T>
class mundy::storage< T >

Storage policy for T:

Member Typedef Documentation

◆ input_type

template<class T>
using mundy::storage< T >::input_type = T

◆ stored_type

template<class T>
using mundy::storage< T >::stored_type = impl::storage_type_t<T>

Constructor & Destructor Documentation

◆ storage() [1/4]

template<class T>
mundy::storage< T >::storage ( )
constexprdefault

◆ storage() [2/4]

template<class T>
mundy::storage< T >::storage ( const storage< T > & )
constexprdefault

◆ storage() [3/4]

template<class T>
mundy::storage< T >::storage ( storage< T > && )
constexprdefault

◆ storage() [4/4]

template<class T>
template<class U>
mundy::storage< T >::storage ( U && value)
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ operator=() [1/2]

template<class T>
storage & mundy::storage< T >::operator= ( const storage< T > & )
constexprdefault

◆ operator=() [2/2]

template<class T>
storage & mundy::storage< T >::operator= ( storage< T > && )
constexprdefault

◆ get() [1/2]

template<class T>
decltype(auto) mundy::storage< T >::get ( )
inlineconstexprnoexcept

◆ get() [2/2]

template<class T>
decltype(auto) mundy::storage< T >::get ( ) const
inlineconstexprnoexcept