[llvm] r327180 - ADT: Make MapVector::value_type and MapVector::size_type public. NFC.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 12 08:37:25 PDT 2018


Tests? (maybe some static_asserts in the MapVector unit test file to
demonstrate the types are correct?)

On Fri, Mar 9, 2018 at 2:54 PM Peter Collingbourne via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: pcc
> Date: Fri Mar  9 14:52:22 2018
> New Revision: 327180
>
> URL: http://llvm.org/viewvc/llvm-project?rev=327180&view=rev
> Log:
> ADT: Make MapVector::value_type and MapVector::size_type public. NFC.
>
> Modified:
>     llvm/trunk/include/llvm/ADT/MapVector.h
>
> Modified: llvm/trunk/include/llvm/ADT/MapVector.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/MapVector.h?rev=327180&r1=327179&r2=327180&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/ADT/MapVector.h (original)
> +++ llvm/trunk/include/llvm/ADT/MapVector.h Fri Mar  9 14:52:22 2018
> @@ -36,13 +36,13 @@ template<typename KeyT, typename ValueT,
>           typename MapType = DenseMap<KeyT, unsigned>,
>           typename VectorType = std::vector<std::pair<KeyT, ValueT>>>
>  class MapVector {
> -  using value_type = typename VectorType::value_type;
> -  using size_type = typename VectorType::size_type;
> -
>    MapType Map;
>    VectorType Vector;
>
>  public:
> +  using value_type = typename VectorType::value_type;
> +  using size_type = typename VectorType::size_type;
> +
>    using iterator = typename VectorType::iterator;
>    using const_iterator = typename VectorType::const_iterator;
>    using reverse_iterator = typename VectorType::reverse_iterator;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180312/7c0a306a/attachment.html>


More information about the llvm-commits mailing list