[ox/std] Make oxIgnoreError constexpr

This commit is contained in:
Gary Talent 2021-04-24 15:50:02 -05:00
parent a2e1ac8851
commit 3ead29a8bb

View File

@ -121,7 +121,7 @@ constexpr Error toError(const Result<T> &ve) noexcept {
}
inline void oxIgnoreError(ox::Error) noexcept {}
constexpr void oxIgnoreError(ox::Error) noexcept {}
#if __cplusplus >= 202002L
#define oxReturnError(x) if (const auto _ox_error = ox::detail::toError(x)) [[unlikely]] return _ox_error
#define oxThrowError(x) if (const auto _ox_error = ox::detail::toError(x)) [[unlikely]] throw _ox_error