+1
-15
@@ -165,21 +165,7 @@ struct [[nodiscard]] Result {
|
|||||||
return error == 0;
|
return error == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr Error copyTo(type &val) const & noexcept {
|
constexpr Error copyTo(type &val) const& noexcept {
|
||||||
if (!error) [[likely]] {
|
|
||||||
val = value;
|
|
||||||
}
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr Error copyTo(type &val) const && noexcept {
|
|
||||||
if (!error) [[likely]] {
|
|
||||||
val = value;
|
|
||||||
}
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr Error copyTo(type &val) & noexcept {
|
|
||||||
if (!error) [[likely]] {
|
if (!error) [[likely]] {
|
||||||
val = value;
|
val = value;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user