mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
integrating the existing state of TON Storage / TON Payments / CPS Fift development branches
This commit is contained in:
parent
040df63c98
commit
4e2624459b
153 changed files with 10760 additions and 1695 deletions
|
@ -582,6 +582,22 @@ class Result {
|
|||
*this = Result<T>();
|
||||
}
|
||||
|
||||
template <class F>
|
||||
td::Result<decltype(std::declval<F>()(std::declval<T>()))> move_map(F &&f) {
|
||||
if (is_error()) {
|
||||
return move_as_error();
|
||||
}
|
||||
return f(move_as_ok());
|
||||
}
|
||||
|
||||
template <class F>
|
||||
decltype(std::declval<F>()(std::declval<T>())) move_fmap(F &&f) {
|
||||
if (is_error()) {
|
||||
return move_as_error();
|
||||
}
|
||||
return f(move_as_ok());
|
||||
}
|
||||
|
||||
private:
|
||||
Status status_;
|
||||
union {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue