3 ms·
I've used boost::optional for a long time. It is long overdue in the standard. NULL should almost never be a valid value. It is also quite useful to enable s
by jnwatson 10y ago
I've used boost::optional for a long time. It is long overdue in the standard. NULL should almost never be a valid value. It is also quite useful to enable safe lazy initialization without heap allocation.
std::variant is just a discriminated union. That's useful for lots of things.
C++11 is old school at this point. Other than for legacy reasons, no one should be using the older stuff.