Optimized implementation of std::visit.
More...
#include <variant>
Go to the source code of this file.
Optimized implementation of std::visit.
- Author
- Sergei Zharko s.zha.nosp@m.rko@.nosp@m.gsi.d.nosp@m.e
- Since
- 27.07.2025
- Note
- For GNUC < 12 the run-time polymorphism built on std::variant with std::visit performs as badly, as one built with virtual inheritance. This header introduces a custom visit function, which deploys a templated if-else selection of the held alternative, which makes the variant-visit pattern performing faster.
-
The current implementation of the kf::visit accepts only one variant (TODO)
Definition in file KfVisit.h.