Re:Const all the things?
by kaashif on Monday January 24, 2022 @01:12PM
(#30061501)
Hmm, is it error, value or value, error? In this situation, I'd prefer something like std::optional or std::variant, which you can't get wrong as easily as swapping two variables in a structured bind.
Those have their problems too, though, and I'd never claim std::variant is "nice" to use.
Those have their problems too, though, and I'd never claim std::variant is "nice" to use.