diff options
author | Regina Pfeifer <regina@mailbox.org> | 2019-02-19 19:15:17 +0100 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-02-21 08:24:26 -0500 |
commit | b8031308f39d66d0dca3b5c59fe62805298dc91f (patch) | |
tree | 07d8b68f04f6fe74c5e19140488483fa125b0498 /Source/cmRange.h | |
parent | a8d51ef8b780644011da8974d99c524e93fe75f3 (diff) | |
download | cmake-b8031308f39d66d0dca3b5c59fe62805298dc91f.tar.gz |
cmRange: Add unit tests
Diffstat (limited to 'Source/cmRange.h')
-rw-r--r-- | Source/cmRange.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmRange.h b/Source/cmRange.h index 7ccb143105..3be5193e79 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 }; |