module
Anystd::any
like container with the capacity defined at compile time.
It doesn't throw exceptions. Instead, asserts are used to ensure valid usage.
Files
- file bn_any.h
- file bn_any_fwd.h
Classes
Functions
-
template<typename Type>auto any_cast(const iany* any) -> const Type*
- Performs type-safe access to the contained object of the given iany.
-
template<typename Type>auto any_cast(iany* any) -> Type*
- Performs type-safe access to the contained object of the given iany.
-
template<typename Type, typename... Args>auto make_any(Args && ... args) -> any<sizeof(Type), alignof(Type)>
- Creates an any deducing its size and alignment from the given Type.
Function documentation
#include <bn_any.h>
template<typename Type>
const Type* any_cast(const iany* any)
Performs type-safe access to the contained object of the given iany.
Template parameters | |
---|---|
Type | Type of the contained value. |
Parameters | |
any | Target iany object. |
Returns | If the given iany pointer is not null, and the type_nullptr . |
#include <bn_any.h>
template<typename Type>
Type* any_cast(iany* any)
Performs type-safe access to the contained object of the given iany.
Template parameters | |
---|---|
Type | Type of the contained value. |
Parameters | |
any | Target iany object. |
Returns | If the given iany pointer is not null, and the type_nullptr . |
#include <bn_any.h>
template<typename Type, typename... Args>
any<sizeof(Type), alignof(Type)> make_any(Args && ... args)
Creates an any deducing its size and alignment from the given Type.
Template parameters | |
---|---|
Type | Type of the value to construct. |
Args | Types of the parameters of the value to construct. |
Parameters | |
args | Parameters of the value to construct. |
Returns | any containing to the constructed value. |