Template Function ams::MakeError

Function Documentation

template<typename T>
inline AMSExpected<T> ams::MakeError(AMSError Error)

Convenience helper to construct an AMSExpected<T> that holds an error.

This wraps tl::unexpected internally but does not expose it in the API.

Template Parameters:

T – The expected value type.

Parameters:

error – Error value to store.

Returns:

AMSExpected<T> containing the given error.