3 ms·
> to get C++ programmers on board, wouldn't the obvious name not be "variant"? The use of "enum" in Rust predates the standardization of C++17, where std::vari
by Liquid_Fire 3y ago
> to get C++ programmers on board, wouldn't the obvious name not be "variant"?
The use of "enum" in Rust predates the standardization of C++17, where std::variant was introduced.
- flohofwoe 3y agoBoost as "stdlib prototype" had that type much earlier though, going back to 2002 or so: https://www.boost.org/doc/libs/1_64_0/doc/html/variant.html https://www.boost.org/doc/libs/1_64_0/doc/html/variant.html The name and concept was also common enough to that I used "Variant" in my own C++ utility class collection around 2005 or so.
- ReleaseCandidat 3y agoYes, but `boost::variant` existed since 2004 https://www.boost.org/users/history/version_1_31_0.html https://www.boost.org/users/history/version_1_31_0.html