3 ms·
boost::variant has been around forever. Most modern C++ codebases do compile-time polymorphism via templates, though. std::variant is a niche use for things li
by otabdeveloper4 4y ago
boost::variant has been around forever.
Most modern C++ codebases do compile-time polymorphism via templates, though. std::variant is a niche use for things like serialization, when you need to make type choices at runtime.