6#if __cpp_lib_expected >= 202211
9#include <tl/expected.hpp>
12#ifdef MR_DOT_NET_BUILD
15template<
typename T,
typename E>
16class expected :
public tl::expected<T, E>
18 using tl::expected<T, E>::expected;
24 return tl::make_unexpected( std::forward<E>( e ) );
35#if ( __cpp_lib_expected >= 202211 || defined( MR_DOT_NET_BUILD ) )
37template<
class T,
class E = std::
string>
43 return std::unexpected( std::forward<E>( e ) );
48template<
class T,
class E = std::
string>
54 return tl::make_unexpected( std::forward<E>( e ) );
65 return "Operation was canceled";
Definition MRCameraOrientationPlugin.h:7
std::string stringOperationCanceled()
Common operation canceled line for all.
Definition MRExpected.h:63
tl::expected< T, E > Expected
Definition MRExpected.h:49
auto unexpected(E &&e)
Definition MRExpected.h:52
auto unexpectedOperationCanceled()
Returns Expected error with stringOperationCanceled()
Definition MRExpected.h:69
Expected< void > VoidOrErrStr
return type for a void function that can produce an error string
Definition MRExpected.h:60