19 class GarlicErrorCategory :
public std::error_category {
21 const char* name() const noexcept
override {
return "garlic"; }
22 std::string message(
int code)
const override {
24 case GarlicError::Redefinition:
25 return "An element with the same identification is already defined. Redifinition is not allowed.";
26 case GarlicError::UndefinedObject:
27 return "Use of an undefined/unresolved object.";
28 case GarlicError::InvalidModule:
29 return "Module description is invalid and could not be used to create a Module.";
38 inline std::error_code
39 make_error_code(garlic::GarlicError error) {
40 static const garlic::error::GarlicErrorCategory category{};
41 return {
static_cast<int>(error), category};
49 struct is_error_code_enum<garlic::
GarlicError> : true_type {};