cpp::SimpleAny specialization for non-owning references to existing objects. See cpp::NonOwningStorage
More...
#include <siplasplas/typeerasure/simpleany.hpp>
|
template<typename T > |
static SimpleAny | create (const T &value) |
| Creates a const reference SimpleAny referencing the given object of type T.
|
|
template<>
class cpp::SimpleAny< NonOwningStorage >
cpp::SimpleAny specialization for non-owning references to existing objects. See cpp::NonOwningStorage
Checks whether the any has an object hosted in or if is empty.
- Returns
- True if the any is empty (There's no hosted object), false instead
Returns a readonly reference to the hosted object.
- Template Parameters
-
T | Type of the returned object. If T is different from the hosted object type, the behavior is undefined (See hasType()). |
Returns a reference to the hosted object.
- Template Parameters
-
T | Type of the returned object. If T is different from the hosted object type, the behavior is undefined (See hasType()). |
Checks if the any has a value of type T.
- Returns
- True if the hosted type is exactly T, false otherwise
Assigns a value of type T.
If the current hosted type is T, performs a copy assignment of value
into the hosted object. Else, the hosted reference is rebinded to point to the new value.
- Parameters
-
value | Value to be assigned to the any |
- Returns
- A reference to
*this
The documentation for this class was generated from the following file: