diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2019-08-04 10:49:16 +0200 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-09-20 10:01:37 -0400 |
commit | c688b401d3adaacc820ef4b589010e8aefa808b1 (patch) | |
tree | 83e46e3dc7c9847692e61d0e6629b1cf9b65d2a5 /Source/cmVisualStudioGeneratorOptions.cxx | |
parent | 9c31d83aa2a3d3f5921f4a5a559e126e285b96c5 (diff) | |
download | cmake-c688b401d3adaacc820ef4b589010e8aefa808b1.tar.gz |
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/cmVisualStudioGeneratorOptions.cxx')
-rw-r--r-- | Source/cmVisualStudioGeneratorOptions.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 3e423e98ea..1139aa9745 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -1,5 +1,7 @@ #include "cmVisualStudioGeneratorOptions.h" +#include <cm/iterator> + #include "cmAlgorithms.h" #include "cmLocalVisualStudioGenerator.h" #include "cmOutputConverter.h" @@ -269,8 +271,8 @@ void cmVisualStudioGeneratorOptions::FixManifestUACFlags() } if (keyValue[1].front() == '\'' && keyValue[1].back() == '\'') { - keyValue[1] = - keyValue[1].substr(1, std::max(0, cm::isize(keyValue[1]) - 2)); + keyValue[1] = keyValue[1].substr( + 1, std::max(std::string::size_type(0), keyValue[1].length() - 2)); } if (keyValue[0] == "level") { |