Fix result<T> constructors resolution during implicit conversions

Convert existing value initializing constructor to templated one enabled
for all types convertible to T.
parent b34f70a1
......@@ -184,7 +184,9 @@ public:
using super::super;
result(T x) : super(detail::result_base_message_init{}, std::move(x)) {
template <class U, class = std::enable_if_t<std::is_constructible_v<T, U>>>
result(U&& x)
: super(detail::result_base_message_init{}, T{std::forward<U>(x)}) {
// nop
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment