Working with generic code it may be beneficial if result<T> can be implicitly converted to result<U> if such conversion is allowed for underlying T and U.
error: could not convert 'boost::system::result<int, boost::system::error_code>((* & arg))' from 'result<int,[...]>' to 'result<long unsigned int,[...]>'
This mostly needed for generic code, where it is impossible (or at least very hard) which type the final function really accepts and argument (or result) may be passed through multiple forwarding functions.
Working with generic code it may be beneficial if
result<T>
can be implicitly converted toresult<U>
if such conversion is allowed for underlyingT
andU
.For example:
results in error
This mostly needed for generic code, where it is impossible (or at least very hard) which type the final function really accepts and argument (or result) may be passed through multiple forwarding functions.