4 ms·
OTOH, GCC and Clang provide warn_unused_result, and it's easy to define types for returning errors from functions that throw a compile-time error if ignored by
by codewiz 12y ago
OTOH, GCC and Clang provide warn_unused_result, and it's easy to define types for returning errors from functions that throw a compile-time error if ignored by the caller.
I find explicit error handling safer and more elegant than exceptions, especially if you consider that writing exception-safe generic code is hard and error prone.