<div dir="ltr">Could add a static_assert in the test to validate that this is the intended type.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 16, 2021 at 5:40 PM Duncan P. N. Exon Smith via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Author: Kevin Cadieux<br>
Date: 2021-11-16T17:40:10-08:00<br>
New Revision: d00256bac07e56fe7ccac2b16fb4e52267616e8e<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/d00256bac07e56fe7ccac2b16fb4e52267616e8e" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/d00256bac07e56fe7ccac2b16fb4e52267616e8e</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/d00256bac07e56fe7ccac2b16fb4e52267616e8e.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/d00256bac07e56fe7ccac2b16fb4e52267616e8e.diff</a><br>
<br>
LOG: ADT: Adding a key_type definition to MapVector<br>
<br>
The key_type type definition for map containers is useful in some<br>
generic, template-based programming scenarios. The addition of key_type<br>
to MapVector is consistent with other map types like DenseMap.<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D113242" rel="noreferrer" target="_blank">https://reviews.llvm.org/D113242</a><br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
    llvm/include/llvm/ADT/MapVector.h<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff  --git a/llvm/include/llvm/ADT/MapVector.h b/llvm/include/llvm/ADT/MapVector.h<br>
index 1de1124f4ea24..f9540999381aa 100644<br>
--- a/llvm/include/llvm/ADT/MapVector.h<br>
+++ b/llvm/include/llvm/ADT/MapVector.h<br>
@@ -43,6 +43,7 @@ class MapVector {<br>
       "The mapped_type of the specified Map must be an integral type");<br>
<br>
 public:<br>
+  using key_type = KeyT;<br>
   using value_type = typename VectorType::value_type;<br>
   using size_type = typename VectorType::size_type;<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>