diff --git a/include/nonstd/expected.hpp b/include/nonstd/expected.hpp index 3c9a238..1ea9536 100644 --- a/include/nonstd/expected.hpp +++ b/include/nonstd/expected.hpp @@ -231,7 +231,22 @@ inline in_place_t in_place_index( detail::in_place_index_tag = detail::in_pla namespace nonstd { using std::expected; -// ... + +#if nsel_P0323R <= 3 + + template< typename T > + constexpr auto make_expected( T && v ) -> expected< typename std::decay::type > + { + return expected< typename std::decay::type >( std::forward( v ) ); + } + + // expected specialization: + + auto inline make_expected() -> expected + { + return expected( in_place ); + } +#endif // nsel_P0323R <= 3 } #else // nsel_USES_STD_EXPECTED