class Any : private Moveable<Any>
Any is a special type of container capable of containing none or single element of any type. It also provides methods for querying the type stored and retrieving the content of specific type.
Any has pick semantics.
Any()
Constructs an empty Any.
Any(pick_ Any& s)
Pick constructor. Transfers content of source Any s while destroying its content by picking..
~Any()
Default destructor.
template <class T, class... Args> T& Create(Args&&... args)
Creates content of type T inside Any. Additional parameters to constructor can be specified.
template <class T> bool Is() const
Tests whether Any contains content of type T.
|
Return value |
true if there is content with type T in Any. |
template <class T> T& Get()
Returns reference to content. Is<T> must be true, otherwise this operation is illegal.
|
Return value |
Reference to content. |
template <class T> const T& Get() const
Returns constant reference to content. Is<T> must be true, otherwise this operation is illegal.
|
Return value |
Reference to content. |
void Clear()
Removes (and destroys) content.
bool IsEmpty() const
|
Return value |
true if there is no content. |
void operator=(Any&& s)
Pick assignment.
Any(Any&& s)
Pick constructor.
|