Prevent utility types from matching to result<T> templated constructor

If `result<T>` is being constructed from `error`, `delegated<T>`
and the likes, then corresponding `result_base<T>` constructor must be
used.
parent 17316327
......@@ -184,7 +184,9 @@ public:
using super::super;
template <class U, class = std::enable_if_t<std::is_constructible_v<T, U>>>
template <class U, class = std::enable_if_t<
std::is_constructible_v<T, U> && !std::is_constructible_v<super, 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