Header Reference: <any>
Header Reference: <any>
The type-erased container std::any, its tradeoffs, and when it is an appropriate tool.
Header Reference: <any>
The type-erased container std::any, its tradeoffs, and when it is an appropriate tool.
Use reference pages to confirm names, categories, nearby facilities, and the constraints that matter before writing or reviewing code.
Header reference pages are meant to answer a practical question quickly: what this header provides, when to reach for it, and which usage rules are easiest to get wrong.
<any>std::anystd::any_caststd::bad_any_caststd::variant#include <any>
int main() {
// Start with the primary facility from <any>.
// Then verify lifetime, invalidation, ordering, or error-handling rules.
return 0;
}