Fix client.cc code, since res.error() without operator overloading… (#921)

* Fix client.cc code, since res.error() without operator overloading causing error in Xcode

* Add unit test to check new error to string with operator overloading

* Add inline as requested in code review comment
This commit is contained in:
Alessio Pollero 2021-05-01 19:29:23 +02:00 committed by GitHub
parent c58b00580e
commit 2a70c45697
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

View file

@ -804,6 +804,12 @@ enum class Error {
Compression,
};
inline std::ostream& operator << (std::ostream& os, const Error& obj)
{
os << static_cast<std::underlying_type<Error>::type>(obj);
return os;
}
class Result {
public:
Result(std::unique_ptr<Response> &&res, Error err,