clang warning in F14 with C++20
- Dominant language
- C++
- Stars
- 30.5k
- Forks
- 5.9k
- PR merge metrics
- No merged PRs in 30d
Description
```
ISO C++20 considers use of overloaded operator '!=' (with operand types 'folly::f14::detail::VectorContainerIterator, rockset::NodeInfo> *>' and 'folly::f14::detail::F14BasicMap, rockset::NodeInfo, folly::transparent>>, folly::transparent>>, void, std::integral_constant>>::iterator' (aka 'folly::f14::detail::VectorContainerIterator, rockset::NodeInfo> *>')) to be ambiguous despite there being a unique best viable function with non-reversed arguments(-Wambiguous-reversed-operator)
F14Policy.h(942, 8): Candidate function with non-reversed arguments
F14Policy.h(939, 8): Ambiguous candidate function with reversed arguments
```
version of the code where the line numbers are correct: https://github.com/facebook/folly/blame/e741d8efa0052df83c187331745dd4441c693fcb/folly/container/detail/F14Policy.h#L939
I suspect that this is because C++20 now adds more operators to the candidate set, and they all have to go through the `VectorContainerIterator` -> `VectorContainerIterator` conversion, which makes them ambiguous, in a way similar to https://stackoverflow.com/questions/60568088/breaking-change-in-c20-or-regression-in-clang-trunk-gcc-trunk-when-overloading
Contributor guide
Assessment
This issue has not been assessed yet.