Boost logo

Boost :

From: Alexander Grund (alexander.grund_at_[hidden])
Date: 2020-07-21 14:51:24


> 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-dc10-2a-lc-boost-bin-v2-libs-outcome-test-comparison-test-clang-linux-10~c++2a~lc-debug-threading-multi-visibility-hidden.html,
> 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<T, U, V> &a, const basic_outcome<R, S, P, N> &b)" so the
other way round
- you define the availability and noexceptness basically as "b == a"
reversing the results

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, ...

If that is the case I don't think it is possible to overcome this.
However if those are convertible, why is the swapping required?

Also: Is the guard around that function "#if __cplusplus <= 202000L"
correct? If so why would you exclude C++23 and up now?

My feeling is that the operator is not required and can be removed which
avoids the recursion.

Hope that asks the right question to point you into solving this.

Regards,
Alex




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk