3 ms·
So... Isn't the fact that you can't default-construct that variant without `monostate` working-as-intended? Not everything can or should be default-constructed
by shadowgovt 2y ago
So... Isn't the fact that you can't default-construct that variant without `monostate` working-as-intended?
Not everything can or should be default-constructed or default-constructible. That does complicate initialization sometimes (i.e. there are practical reasons to "suspend" construction until you have all the needed data), but you're not avoiding breaking type safety by adding a `monostate`, you're just giving yourself the "could be null" headache.