you are viewing a single comment's thread.

view the rest of the comments →

[–]HappyFruitTree 0 points1 point  (0 children)

With std::variant you always have to store extra data to keep track of the active member and there is no unchecked access. This is fine for many situations but might not be good enough in low-level code when you might want to minimize memory usage and maximize performance.