diff options
author | Brad King <brad.king@kitware.com> | 2021-09-09 18:02:41 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-09-09 18:02:52 (GMT) |
commit | ed9abd99772cbdcb2e4dd195eb4a62104ce86c95 (patch) | |
tree | b39f042f9534d84e4570cdae0cfd3af63677d990 /Source/cmAlgorithms.h | |
parent | 111f818b54c167ab08757f770289d17a6aef61e3 (diff) | |
parent | 8ff0c2b1dd4b74a1e8e7a79adbfc5db55edff393 (diff) | |
download | CMake-ed9abd99772cbdcb2e4dd195eb4a62104ce86c95.zip CMake-ed9abd99772cbdcb2e4dd195eb4a62104ce86c95.tar.gz CMake-ed9abd99772cbdcb2e4dd195eb4a62104ce86c95.tar.bz2 |
Merge topic 'mocmacrosonce'
8ff0c2b1dd AutoMoc: Do not list moc macros multiple times
6e2f4029c0 cmAlgorithms: Preserve const-ness in cmRemoveDuplicates range signature
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6459
Diffstat (limited to 'Source/cmAlgorithms.h')
-rw-r--r-- | Source/cmAlgorithms.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index d00f420..a1830f9 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -137,7 +137,13 @@ ForwardIterator cmRemoveDuplicates(ForwardIterator first, ForwardIterator last) } template <typename Range> -typename Range::const_iterator cmRemoveDuplicates(Range& r) +typename Range::iterator cmRemoveDuplicates(Range& r) +{ + return cmRemoveDuplicates(r.begin(), r.end()); +} + +template <typename Range> +typename Range::const_iterator cmRemoveDuplicates(Range const& r) { return cmRemoveDuplicates(r.begin(), r.end()); } |