diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2019-08-04 08:49:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-09-20 14:01:37 (GMT) |
commit | c688b401d3adaacc820ef4b589010e8aefa808b1 (patch) | |
tree | 83e46e3dc7c9847692e61d0e6629b1cf9b65d2a5 /Source/cmStateDirectory.cxx | |
parent | 9c31d83aa2a3d3f5921f4a5a559e126e285b96c5 (diff) | |
download | CMake-c688b401d3adaacc820ef4b589010e8aefa808b1.zip CMake-c688b401d3adaacc820ef4b589010e8aefa808b1.tar.gz CMake-c688b401d3adaacc820ef4b589010e8aefa808b1.tar.bz2 |
cmstd: Modernize CMake system headers
Provide a standardized way to handle the C++ "standard" headers
customized to be used with current CMake C++ standard constraints.
Offer under directory `cm` headers which can be used as direct
replacements of the standard ones. For example:
#include <cm/string_view>
can be used safely for CMake development in place of the `<string_view>`
standard header.
Fixes: #19491
Diffstat (limited to 'Source/cmStateDirectory.cxx')
-rw-r--r-- | Source/cmStateDirectory.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/cmStateDirectory.cxx b/Source/cmStateDirectory.cxx index ede00a0..1262f53 100644 --- a/Source/cmStateDirectory.cxx +++ b/Source/cmStateDirectory.cxx @@ -5,9 +5,10 @@ #include <algorithm> #include <cassert> -#include <iterator> #include <vector> +#include <cm/iterator> + #include "cmAlgorithms.h" #include "cmProperty.h" #include "cmPropertyMap.h" @@ -177,7 +178,7 @@ cmStringRange GetPropertyContent(T const& content, U contentEndPosition) { auto end = content.begin() + contentEndPosition; - auto rbegin = cmMakeReverseIterator(end); + auto rbegin = cm::make_reverse_iterator(end); rbegin = std::find(rbegin, content.rend(), cmPropertySentinal); return cmMakeRange(rbegin.base(), end); @@ -189,7 +190,7 @@ cmBacktraceRange GetPropertyBacktraces(T const& content, U const& backtraces, { auto entryEnd = content.begin() + contentEndPosition; - auto rbegin = cmMakeReverseIterator(entryEnd); + auto rbegin = cm::make_reverse_iterator(entryEnd); rbegin = std::find(rbegin, content.rend(), cmPropertySentinal); auto it = backtraces.begin() + std::distance(content.begin(), rbegin.base()); @@ -270,7 +271,7 @@ void cmStateDirectory::PrependIncludeDirectoriesEntry( this->Snapshot_.Position->IncludeDirectoryPosition; auto rend = this->DirectoryState->IncludeDirectories.rend(); - auto rbegin = cmMakeReverseIterator(entryEnd); + auto rbegin = cm::make_reverse_iterator(entryEnd); rbegin = std::find(rbegin, rend, cmPropertySentinal); auto entryIt = rbegin.base(); @@ -440,7 +441,7 @@ void cmStateDirectory::PrependLinkDirectoriesEntry( this->Snapshot_.Position->LinkDirectoriesPosition; auto rend = this->DirectoryState->LinkDirectories.rend(); - auto rbegin = cmMakeReverseIterator(entryEnd); + auto rbegin = cm::make_reverse_iterator(entryEnd); rbegin = std::find(rbegin, rend, cmPropertySentinal); auto entryIt = rbegin.base(); |