diff --git a/include/boost/system/result.hpp b/include/boost/system/result.hpp index 8479b36..4084ca8 100644 --- a/include/boost/system/result.hpp +++ b/include/boost/system/result.hpp @@ -85,6 +85,10 @@ template using remove_cvref = typename std::remove_cv< typename std::re template using is_errc_t = std::is_same...>, mp11::mp_list>; +template struct is_constructible: std::is_constructible {}; +template struct is_constructible: std::is_convertible {}; +template struct is_constructible: std::is_convertible {}; + } // namespace detail // result @@ -141,9 +145,9 @@ public: // explicit, value template::value && + detail::is_constructible::value && !(detail::is_errc_t::value && std::is_arithmetic::value) && - !std::is_constructible::value && + !detail::is_constructible::value && sizeof...(A) >= 1 >::type> explicit constexpr result( A&&... a ) @@ -154,8 +158,8 @@ public: // explicit, error template::value && - std::is_constructible::value && + !detail::is_constructible::value && + detail::is_constructible::value && sizeof...(A) >= 1 >::type> explicit constexpr result( A&&... a )