-
#include "tensorstore/util/result.h"
- Result<void> tensorstore::MakeResult();
-
template <int&... ExplicitArgumentBarrier, typename T>
Result<typename std::remove_cvref_t<T>>
tensorstore::MakeResult(T&& t); -
template <typename U, typename... Args>
Result<U> tensorstore::MakeResult(Args&&... args); Returns a Result<T> with a (possibly-default) value.
- Example:
Result<void> r = MakeResult(); Result<int> x = MakeResult<int>(); auto result = MakeResult(7);