From: David Blaikie Date: Tue, 3 Mar 2015 18:29:23 +0000 (+0000) Subject: DenseMapIterator: Avoid explicitly declaring the copy ctor as this makes the copy... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=88f45e5ecd3d8ef28960ded309af25c043ea6ab9;p=oota-llvm.git DenseMapIterator: Avoid explicitly declaring the copy ctor as this makes the copy assignment operator deprecated in C++11 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231093 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h index 1699ea3ea6a..d947ffaa7ed 100644 --- a/include/llvm/ADT/DenseMap.h +++ b/include/llvm/ADT/DenseMap.h @@ -1008,11 +1008,13 @@ public: if (!NoAdvance) AdvancePastEmptyBuckets(); } - // If IsConst is true this is a converting constructor from iterator to - // const_iterator and the default copy constructor is used. - // Otherwise this is a copy constructor for iterator. + // Converting ctor from non-const iterators to const iterators. SFINAE'd out + // for const iterator destinations so it doesn't end up as a user defined copy + // constructor. + template ::type> DenseMapIterator( - const DenseMapIterator &I) + const DenseMapIterator &I) : Ptr(I.Ptr), End(I.End) {} reference operator*() const {