r/learncpp • u/vgordievskiy • Mar 09 '21
How to improve it?
;
;
SResp
boost::optional<std::string>
int
How to improve this code?
11
Upvotes
r/learncpp • u/vgordievskiy • Mar 09 '21
;
;
SResp
boost::optional<std::string>
int
How to improve this code?
View all comments
Show parent comment
2
u/jedwardsol Mar 09 '21
Exactly. My comment is that a small sample doesn't need 2 different methods of returning errors (optional and status+result). But in the bigger program it may be unavoidable or ideal.