summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2019-02-19 18:15:17 (GMT)
committerBrad King <brad.king@kitware.com>2019-02-21 13:24:26 (GMT)
commitb8031308f39d66d0dca3b5c59fe62805298dc91f (patch)
tree07d8b68f04f6fe74c5e19140488483fa125b0498 /Source
parenta8d51ef8b780644011da8974d99c524e93fe75f3 (diff)
downloadCMake-b8031308f39d66d0dca3b5c59fe62805298dc91f.zip
CMake-b8031308f39d66d0dca3b5c59fe62805298dc91f.tar.gz
CMake-b8031308f39d66d0dca3b5c59fe62805298dc91f.tar.bz2
cmRange: Add unit tests
Diffstat (limited to 'Source')
-rw-r--r--Source/cmRange.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmRange.h b/Source/cmRange.h
index 7ccb143..3be5193 100644
--- a/Source/cmRange.h
+++ b/Source/cmRange.h
@@ -212,6 +212,13 @@ private:
};
template <typename Iter1, typename Iter2>
+bool operator==(cmRange<Iter1> const& left, cmRange<Iter2> const& right)
+{
+ return left.size() == right.size() &&
+ std::equal(left.begin(), left.end(), right.begin());
+}
+
+template <typename Iter1, typename Iter2>
auto cmMakeRange(Iter1 begin, Iter2 end) -> cmRange<Iter1>
{
return { begin, end };