[ox/std] Change Result(type&&) to use forward
This commit is contained in:
parent
8d0bf40037
commit
13ba8430c7
2
deps/ox/src/ox/std/error.hpp
vendored
2
deps/ox/src/ox/std/error.hpp
vendored
@ -131,7 +131,7 @@ struct [[nodiscard]] Result {
|
|||||||
constexpr Result(const type &value, const Error &error = OxError(0)) noexcept: value(const_cast<type&>(value)), error(error) {
|
constexpr Result(const type &value, const Error &error = OxError(0)) noexcept: value(const_cast<type&>(value)), error(error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr Result(type &&value, const Error &error = OxError(0)) noexcept: value(std::move(value)), error(error) {
|
constexpr Result(type &&value, const Error &error = OxError(0)) noexcept: value(ox::forward<type>(value)), error(error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
explicit constexpr operator const type&() const noexcept {
|
explicit constexpr operator const type&() const noexcept {
|
||||||
|
Loading…
Reference in New Issue
Block a user