[ox/std] Add oxRequireT for throwing instead of returning Errors

This commit is contained in:
Gary Talent 2021-04-01 21:58:03 -05:00
parent 86f0e1ca08
commit bcc4b5f816

View File

@ -122,4 +122,5 @@ inline void oxIgnoreError(ox::Error) noexcept {}
#define oxConcatImpl(a, b) a##b
#define oxConcat(a, b) oxConcatImpl(a, b)
#define oxRequire(out, x) auto [out, oxConcat(oxRequire_err_, __LINE__)] = x; oxReturnError(oxConcat(oxRequire_err_, __LINE__))
#define oxRequireT(out, x) auto [out, oxConcat(oxRequire_err_, __LINE__)] = x; oxThrowError(oxConcat(oxRequire_err_, __LINE__))