Closed ClausKlein closed 2 months ago
The ISO C++20 considers use of overloaded operator '==' ... to be ambiguous despite there being a unique best viable function
error comes from the mismatch in constness of the operator==()
definition - see S.O. for more explanation https://stackoverflow.com/a/60387060/6946577
ie:
https://github.com/eranpeer/FakeIt/blob/cb39d8a053876f74dfeed66dd335d3041f142095/tests/move_only_return_tests.cpp#L36
should be
- bool operator==(const ConcreteType& other) {
+ bool operator==(const ConcreteType& other) const {
Feel free to make a pull request
Since #322 and #329 are merged there shouldn't be any warning in the next version (with the default compiler options at least).
see https://github.com/eranpeer/FakeIt/pull/319 and https://github.com/ClausKlein/FakeIt/actions/runs/4805793677