diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index ca4c1fd3b..161a2cb6e 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -258,14 +258,15 @@ typename Range::const_iterator cmRemoveMatching(Range &r, MatchRange const& m) template typename Range::const_iterator cmRemoveDuplicates(Range& r) { - std::vector unique; + typedef std::vector UniqueVector; + UniqueVector unique; unique.reserve(r.size()); std::vector indices; size_t count = 0; for(typename Range::const_iterator it = r.begin(); it != r.end(); ++it, ++count) { - const typename Range::iterator low = + const typename UniqueVector::iterator low = std::lower_bound(unique.begin(), unique.end(), *it); if (low == unique.end() || *low != *it) {