Title: Theory / Unimportant / CS / Programming / C++ / STL / any
On every note of this deck, unless a note says otherwise:
Page: https://en.cppreference.com/w/cpp/utility/variant/monostate

Typ: std::any
Meaning: a type-safe container for single values of any copy constructible type.
Page: https://en.cppreference.com/w/cpp/utility/variant/monostate
Language: C++

Instruction: a.reset()
Effect: destroys contained object
Language: C++
Context: any
Variables: std::any a;

Instruction: a.type()
Language: C++
Returns: the typeid of the contained value
Variables: std::any a;

Instruction: a.has_value()
Language: C++
Context: Any
Returns: whether a contains a value
Variables: std::any a;

Instruction: a.emplace<T>(args)
Effect: delete the contained value and put instead T(args)
Language: C++
Variables: std::any a;

Instruction: static_cast<T>(a)
Language: C++
Returns: The value a, converted to T if necessary.
Variables: std::any a;
Exception: std::bad_any_cast if the conversion can't be done

Instruction: std::make_any<T>(args)
Language: C++
Returns: T(args) of type any