6 #ifndef INCLUDE_SAMSUNG_WASM_COMMON_H_ 7 #define INCLUDE_SAMSUNG_WASM_COMMON_H_ 28 explicit operator bool() const noexcept;
34 const T& operator*() const;
40 const T* operator->() const;
48 explicit operator bool()
const noexcept;
53 using Seconds = std::chrono::duration<double>;
57 return static_cast<bool>(
Result<void>{operation_result});
66 return const_cast<T&
>(
static_cast<const Result<T>*
>(
this)->
operator*());
76 return const_cast<T*
>(
static_cast<const Result<T>*
>(
this)->operator->());
87 #endif // INCLUDE_SAMSUNG_WASM_COMMON_H_ An operation ended successfully.
std::chrono::duration< double > Seconds
Default duration type used throughout the API.
T & operator*()
Returns Result<T>::value. Defined if T is not void.
T * operator->()
Accesses Result<T>::value. Defined if T is not void.
OperationResult
Enumerates possible outcomes of WASM function calls.
OperationResult operation_result
Operation result.