summaryrefslogtreecommitdiffstats
path: root/Source/cmcmd.cxx
diff options
context:
space:
mode:
authorMatthias Maennich <matthias@maennich.net>2017-10-05 10:43:06 (GMT)
committerMatthias Maennich <matthias@maennich.net>2017-10-23 15:51:35 (GMT)
commit57132765e078a8654d1166d7d8a1c29ec01f47b4 (patch)
treed51bdca75aec3b2446c5c3963046608f67406f88 /Source/cmcmd.cxx
parentfa501bc8262e4a0fa6207d351eef3bf6822748ef (diff)
downloadCMake-57132765e078a8654d1166d7d8a1c29ec01f47b4.zip
CMake-57132765e078a8654d1166d7d8a1c29ec01f47b4.tar.gz
CMake-57132765e078a8654d1166d7d8a1c29ec01f47b4.tar.bz2
Replace cmArray{Begin,End,Size} by their standard counterparts
std::{begin,end} are part of C++11, std::{cbegin,cend} are part of C++14 and an standard compliant implementation has been introduced within the 'cm' namespace: cm::{cbegin,cend}. std::size is only part of C++17, hence exposing a compliant implementation within namespace cm (cm::size). where possible, the standard implementations are reused.
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r--Source/cmcmd.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index ed507fd..4810cd0 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -35,6 +35,7 @@
#include <algorithm>
#include <functional>
#include <iostream>
+#include <iterator>
#include <map>
#include <memory> // IWYU pragma: keep
#include <sstream>
@@ -1013,8 +1014,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
} else if (cmHasLiteralPrefix(arg, "--format=")) {
format = arg.substr(9);
bool isKnown =
- std::find(cmArrayBegin(knownFormats), cmArrayEnd(knownFormats),
- format) != cmArrayEnd(knownFormats);
+ std::find(cm::cbegin(knownFormats), cm::cend(knownFormats),
+ format) != cm::cend(knownFormats);
if (!isKnown) {
cmSystemTools::Error("Unknown -E tar --format= argument: ",