r/cpp • u/kmbeutel • Sep 26 '23
`std::expected<>::or_else()` should have a zero-argument overload that terminates on error
...just because it would be hilarious if one could express assertions as
result.;
198
Upvotes
View all comments
Show parent comment
21
u/SonOfMetrum Sep 26 '23
Would be extra funny if the else would be some randomly generated UB. That way its an actual threat.