Using llvm::DenseMap and llvm::StringMap in external projects compiled with c++20 results in error when comparing their iterators
Iterating over a const DenseMap& causes no issues. However There are issues with iterating over a non const DenseMap. With StringMap there are issues no matter what kind of reference the StringMap is.
using clang-10 as the host compiler, warnings for StringMap can be supressed with -Wno-ambiguous-reversed-operator however this has no effect on supressing the DenseMap warnings. That has been addressed in clang-11 which will suppress all these warnings
See example here
https://godbolt.org/z/Keqa1n
Note this is compiling with a trunk build of clang so some of these warnings could change down the line, the warnings emitted for clang-10.0.1 will stay consistent though
Extended Description
Using llvm::DenseMap and llvm::StringMap in external projects compiled with c++20 results in error when comparing their iterators
Iterating over a
const DenseMap&
causes no issues. However There are issues with iterating over a non const DenseMap. With StringMap there are issues no matter what kind of reference the StringMap is.using clang-10 as the host compiler, warnings for StringMap can be supressed with
-Wno-ambiguous-reversed-operator
however this has no effect on supressing the DenseMap warnings. That has been addressed in clang-11 which will suppress all these warningsSee example here https://godbolt.org/z/Keqa1n Note this is compiling with a trunk build of clang so some of these warnings could change down the line, the warnings emitted for clang-10.0.1 will stay consistent though