2 ms·
> Using std::variant feels like a trolling from the language designers who refused to provide proper type-safe unions into the language. And, alas, deliberate
by eru 5y ago
> Using std::variant feels like a trolling from the language designers who refused to provide proper type-safe unions into the language.
And, alas, deliberate trolling would be preferable to reality.
Deliberate trolling would indicate a conscious design. C++ accumulated cruft over the years in what looks like brownian motion in retrospect, and almost never shed any.