<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - DenseMap and StringMap can't be used in range for under c++20"
href="https://bugs.llvm.org/show_bug.cgi?id=47624">47624</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>DenseMap and StringMap can't be used in range for under c++20
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Core LLVM classes
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>N.James93@hotmail.co.uk
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>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
<a href="https://godbolt.org/z/Keqa1n">https://godbolt.org/z/Keqa1n</a>
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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>