[error_state] add a sneaky little stream operator to simplify combining error_states

This commit is contained in:
Joe Thornber
2015-04-08 13:58:41 +01:00
parent 0fee897fda
commit a934ee69c4
3 changed files with 37 additions and 0 deletions

View File

@ -11,6 +11,11 @@ namespace base {
};
error_state combine_errors(error_state lhs, error_state rhs);
inline error_state &operator <<(error_state &err, error_state rhs) {
err = combine_errors(err, rhs);
return err;
}
}
//----------------------------------------------------------------