Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
int_19h
· 4y ago · 0 comments
In a language like C++ returning status codes means that callers can and will ignore it, even when they shouldn't.
Comments
[–]
zetafunction
4y ago
Since C++17, using [[nodiscard]] can help with that.
[–]
jandrewrogers
4y ago
Indeed, Google's implementation of Status/StatusOr requires explicit handling of those objects, they cannot be discarded automatically.