[#util-Overloaded] = xref:util.adoc[util]::Overloaded :relfileprefix: ../ :mrdocs: Overloaded helper for std::visit. This helper and std::visit in general are useful to write code that switches on a variant type. Unlike if/else‐if and switch/case statements, std::visit will trigger compile errors if there are unhandled cases. == Synopsis Declared in `<util/overloaded.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class... Ts> struct Overloaded : Ts... ---- == Description Implementation comes from and example usage can be found at https://en.cppreference.com/w/cpp/utility/variant/visit#Example == Base Classes [cols="1,4"] |=== | Name| Description | `Ts...` | |=== == Using Declarations [cols="1"] |=== | Name | xref:util/Overloaded/operator().adoc[`operator()`] |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#