modm API documentation
Utilities

Classes

class  modm::allocator::AllocatorBase< T >
 
class  modm::allocator::Dynamic< T >
 
class  modm::inplace_any< Size >
 
class  modm::inplace_function< R (Args...), Capacity, Alignment >
 

Typedefs

template<size_t Cap, size_t Align = alignof(aligned_storage_impl::aligned_storage_helper<Cap>)>
using modm::aligned_storage_t = typename aligned_storage< Cap, Align >::type
 
template<typename T >
using modm::get_callable_signature_t = typename get_callable_signature< T >::type
 

Functions

template<typename T , std::size_t Size>
auto modm::any_cast (const inplace_any< Size > *any) noexcept-> std::add_pointer_t< std::add_const_t< std::remove_cvref_t< T >>>
 
template<typename T , std::size_t Size>
auto modm::any_cast (inplace_any< Size > *any) noexcept-> std::add_pointer_t< std::remove_cvref_t< T >>
 
template<typename T , std::size_t Size>
auto modm::any_cast (const inplace_any< Size > &any) noexcept-> std::add_const_t< std::remove_cvref_t< T >> &
 
template<std::size_t Size>
void modm::swap (inplace_any< Size > &first, inplace_any< Size > &second) noexcept
 

Detailed Description

lbuild module: modm:utils

Typedef Documentation

template<typename T >
using modm::get_callable_signature_t = typedef typename get_callable_signature<T>::type

Deduce function signature type from callable

Identity for function types For functions objects the return type and parameters of operator() are deduced

e.g. deduces "void(int)" for "[&](int){}"

Warning
Not applicable to overload sets

Function Documentation

template<typename T , std::size_t Size>
auto modm::any_cast ( const inplace_any< Size > &  any) -> std::add_const_t< std::remove_cvref_t< T >> &
noexcept

Type-safe access to the contained value

Warning
asserts if inplace any is empty or on type mismatch
Parameters
anyreference to const inplace_any object
Template Parameters
Ttype of the object to access
Returns
reference to contained object
template<typename T , std::size_t Size>
auto modm::any_cast ( const inplace_any< Size > *  any) -> std::add_pointer_t< std::add_const_t< std::remove_cvref_t< T >>>
noexcept

Type-safe access to the contained value

Parameters
anypointer to const inplace_any object
Template Parameters
Ttype of the object to access
Returns
pointer to contained object or nullptr if empty or on type mismatch
template<typename T , std::size_t Size>
auto modm::any_cast ( inplace_any< Size > *  any) -> std::add_pointer_t< std::remove_cvref_t< T >>
noexcept

Type-safe access to the contained value

Parameters
anypointer to inplace_any object
Template Parameters
Ttype of the object to access
Returns
pointer to contained object or nullptr if empty or on type mismatch
template<std::size_t Size>
void modm::swap ( inplace_any< Size > &  first,
inplace_any< Size > &  second 
)
noexcept

Swap contained values of two inplace_any objects