1. 6

  2. 2

    It’s good that it throws on invalid access instead of causing undefined behavior. I facepalmed when I learned std::optional implements -> overload with unchecked access that will happily cause undefined behavior.

    However, the overload helper + lambda visitors seem like a hack: noisy and magic. If C++ is going to add something new for this user case, why not a proper pattern matching?