...
This commit is contained in:
@@ -167,6 +167,17 @@ static constexpr ErrT mcc_deduce_error(const DErrT& err, const ErrT& default_err
|
||||
}
|
||||
}
|
||||
|
||||
template <mcc_error_c ErrT, mcc_error_c DErrT>
|
||||
static constexpr std::error_code mcc_deduce_error_code(const DErrT& err, const ErrT& default_err)
|
||||
requires(std::is_error_code_enum_v<ErrT> || std::derived_from<ErrT, std::error_code>)
|
||||
{
|
||||
if constexpr (std::is_error_code_enum_v<DErrT>) {
|
||||
return err;
|
||||
} else {
|
||||
return default_err;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ATMOSPHERIC REFRACTION MODEL CLASS CONCEPT */
|
||||
|
||||
Reference in New Issue
Block a user