modm API documentation
|
#include <modm/utils/inplace_any.hpp>
Public Member Functions | |
inplace_any () noexcept = default | |
Construct empty inplace_any. | |
inplace_any (const inplace_any &other) | |
inplace_any (inplace_any &&other) noexcept | |
inplace_any & | operator= (const inplace_any &other) |
inplace_any & | operator= (inplace_any &&other) noexcept |
template<size_t OtherSize> | |
inplace_any (const inplace_any< OtherSize > &other) | |
template<size_t OtherSize> | |
inplace_any (inplace_any< OtherSize > &&other) noexcept | |
template<size_t OtherSize> | |
inplace_any & | operator= (const inplace_any< OtherSize > &other) |
template<size_t OtherSize> | |
inplace_any & | operator= (inplace_any< OtherSize > &&other) noexcept |
template<typename T , typename... Args> | |
requires inplace_any_impl::compatible_value_type< T > | inplace_any (std::in_place_type_t< T >, Args &&...args) |
In-place construct object. | |
template<typename T > | |
requires inplace_any_impl::compatible_value_type< T > | inplace_any (T &&value) |
Initialize from object. | |
template<typename T > | |
requires inplace_any_impl::compatible_value_type< T > inplace_any & | operator= (T &&value) |
Assign from object. | |
template<typename T , typename... Args> | |
requires inplace_any_impl::compatible_value_type< T > T & | emplace (Args &&...args) |
Change the contained object, constructing the new object directly. | |
void | reset () noexcept |
Destroy the contained object. | |
bool | has_value () const noexcept |
Test if object has a value. | |
bool | empty () const noexcept |
Test if object is empty. | |
operator bool () const noexcept | |
Test if object has a value. | |
void | swap (inplace_any &other) noexcept |
Type-safe container for single values of any copy constructible type of size less than the capacity. The objects are stored in place, no allocation takes place.
All stored objects must by copy-constructible and nothrow move-constructible.
modm::inplace_any< Size >::inplace_any | ( | const inplace_any< OtherSize > & | other | ) |
Copy-construct from inplace_any with smaller capacity
|
noexcept |
Move-construct from inplace_any with smaller capacity
inplace_any& modm::inplace_any< Size >::operator= | ( | const inplace_any< OtherSize > & | other | ) |
Copy-assign from inplace_any with smaller capacity
|
noexcept |
Move-assign from inplace_any with smaller capacity