Sum types don't just store values of different types. They store different states, with associated data. So, for instance, consider the following simplistic expression AST; how would you store it in a std::variant?
enum Expr {
Number(usize),
Negate(Expr),
Add(Expr, Expr),
Sub(Expr, Expr),
Let(String, Expr, Expr),
Var(String),
}