<div dir="ltr">Tests? (maybe some static_asserts in the MapVector unit test file to demonstrate the types are correct?)</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Mar 9, 2018 at 2:54 PM Peter Collingbourne 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: pcc<br>
Date: Fri Mar 9 14:52:22 2018<br>
New Revision: 327180<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=327180&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=327180&view=rev</a><br>
Log:<br>
ADT: Make MapVector::value_type and MapVector::size_type public. NFC.<br>
<br>
Modified:<br>
llvm/trunk/include/llvm/ADT/MapVector.h<br>
<br>
Modified: llvm/trunk/include/llvm/ADT/MapVector.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/MapVector.h?rev=327180&r1=327179&r2=327180&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/MapVector.h?rev=327180&r1=327179&r2=327180&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ADT/MapVector.h (original)<br>
+++ llvm/trunk/include/llvm/ADT/MapVector.h Fri Mar 9 14:52:22 2018<br>
@@ -36,13 +36,13 @@ template<typename KeyT, typename ValueT,<br>
typename MapType = DenseMap<KeyT, unsigned>,<br>
typename VectorType = std::vector<std::pair<KeyT, ValueT>>><br>
class MapVector {<br>
- using value_type = typename VectorType::value_type;<br>
- using size_type = typename VectorType::size_type;<br>
-<br>
MapType Map;<br>
VectorType Vector;<br>
<br>
public:<br>
+ using value_type = typename VectorType::value_type;<br>
+ using size_type = typename VectorType::size_type;<br>
+<br>
using iterator = typename VectorType::iterator;<br>
using const_iterator = typename VectorType::const_iterator;<br>
using reverse_iterator = typename VectorType::reverse_iterator;<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="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>