On 21/07/2020 15:51, Alexander Grund via Boost wrote:
Finally, if anyone more expert at C++ than I can suggest how to fix https://www.boost.org/development/tests/develop/developer/output/teeks99-dkr...,
I'd appreciate the help.
Just some observations that might help:
- Failing test is BOOST_CHECK(a == b); with "outcome<int> a(1); result<int> b(1);" - Hence the operation is "operator==(outcome, result) - Failing stacktrace shows bottom-most: "operator==(const basic_result
&a, const basic_outcome &b)" so the other way round - you define the availability and noexceptness basically as "b == a" reversing the results
All correct.
Is it possible that outcome<T> and result<T> are convertible? If so, that would explain the recursion: to check a==b you need to check b==a so you need to check a==b, ...
An outcome<T> can be explicitly constructed from a result<T> yes.
But the recursion isn't from that. result == outcome is available if
outcome == result is available. outcome == result