diff --git a/include/nonstd/expected.hpp b/include/nonstd/expected.hpp index 305f3ab..33b58f9 100644 --- a/include/nonstd/expected.hpp +++ b/include/nonstd/expected.hpp @@ -1567,6 +1567,18 @@ make_unexpected( E && value ) -> unexpected_type< typename std::decay::type > return unexpected_type< typename std::decay::type >( std::forward(value) ); } +template< + typename E, typename... Args, + typename = std::enable_if< + std::is_constructible::value + > +> +nsel_constexpr14 auto +make_unexpected(in_place_t inplace, Args... args) -> unexpected_type< typename std::decay > +{ + return unexpected_type< typename std::decay::type >(inplace, std::forward(args)...); +} + #if nsel_P0323R <= 3 /*nsel_constexpr14*/ auto inline