[ox/std] Add a form of small string and small vector optimization

This commit is contained in:
2021-05-28 02:46:09 -05:00
parent b36cd1694b
commit 1df1e3809f
8 changed files with 421 additions and 283 deletions

View File

@ -126,8 +126,8 @@ constexpr void oxIgnoreError(ox::Error) noexcept {}
#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
#else
#define oxReturnError(x) if (const auto _ox_error = ox::detail::toError(x)) return _ox_error
#define oxThrowError(x) if (const auto _ox_error = ox::detail::toError(x)) throw _ox_error
#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_error
#endif
#define oxConcatImpl(a, b) a##b
#define oxConcat(a, b) oxConcatImpl(a, b)