Move and return the internally stored value or alternative if an error is stored.
| 371 | |
| 372 | /// Move and return the internally stored value or alternative if an error is stored. |
| 373 | T ValueOr(T alternative) && { |
| 374 | if (!ok()) { |
| 375 | return alternative; |
| 376 | } |
| 377 | return MoveValueUnsafe(); |
| 378 | } |
| 379 | |
| 380 | /// Return a copy of the internally stored value or alternative if an error is stored. |
| 381 | T ValueOr(T alternative) const& { |