diff options
author | Regina Pfeifer <regina@mailbox.org> | 2019-02-19 18:15:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-02-21 13:24:26 (GMT) |
commit | b8031308f39d66d0dca3b5c59fe62805298dc91f (patch) | |
tree | 07d8b68f04f6fe74c5e19140488483fa125b0498 /Source | |
parent | a8d51ef8b780644011da8974d99c524e93fe75f3 (diff) | |
download | CMake-b8031308f39d66d0dca3b5c59fe62805298dc91f.zip CMake-b8031308f39d66d0dca3b5c59fe62805298dc91f.tar.gz CMake-b8031308f39d66d0dca3b5c59fe62805298dc91f.tar.bz2 |
cmRange: Add unit tests
Diffstat (limited to 'Source')
-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 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 }; |