Skip to content

Instantly share code, notes, and snippets.

@Naios
Created April 21, 2017 15:39
Show Gist options
  • Save Naios/76d7b8a8c286f7ef9daabd23122c38eb to your computer and use it in GitHub Desktop.
Save Naios/76d7b8a8c286f7ef9daabd23122c38eb to your computer and use it in GitHub Desktop.
Custom error category
class process_error_category : public std::error_category {
public:
using error_category::error_category;
const char* name() const noexcept override {
return "";
}
std::string message(int _Errval) const override {
return "";
}
};
static std::error_condition error_of() {
static process_error_category const cat;
return std::error_condition(5, cat);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment