[ox] Fix for C++20
This commit is contained in:
2
deps/ox/src/ox/std/error.hpp
vendored
2
deps/ox/src/ox/std/error.hpp
vendored
@ -172,7 +172,7 @@ constexpr Error toError(const Result<T> &ve) noexcept {
|
||||
constexpr void oxIgnoreError(const 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]] ox::Exception(_ox_error)
|
||||
#define oxThrowError(x) if (const auto _ox_error = ox::detail::toError(x)) [[unlikely]] throw ox::Exception(_ox_error)
|
||||
#else
|
||||
#define oxReturnError(err) if (const auto _ox_error = ox::detail::toError(err)) return _ox_error
|
||||
#define oxThrowError(err) if (const auto _ox_error = ox::detail::toError(err)) throw ox::Exception(_ox_error)
|
||||
|
Reference in New Issue
Block a user