Should You Put optional<T> in a Container?

6 years ago
ian $k_f34kRn4S

https://foonathan.net/blog/2018/04/09/optional-in-container.html

What’s the difference between an `std::optional<T>` and a `std::variant<T, std::monostate>`?