[ox/std] Make oxIgnoreError take const ref

This commit is contained in:
Gary Talent 2021-10-25 19:09:03 -05:00
parent e2b9823ae2
commit 5f7bb2e1ae

View File

@ -169,7 +169,7 @@ constexpr Error toError(const Result<T> &ve) noexcept {
}
constexpr void oxIgnoreError(ox::Error) 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)