summaryrefslogtreecommitdiffstats
path: root/Source/cmSeparateArgumentsCommand.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2021-09-13 14:55:00 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2021-09-14 15:42:02 (GMT)
commit79362cf11715ffc5acd48ec884559d69a35a655d (patch)
treef2d2f64b5949f3e23acd80a12c2f21c096c08b48 /Source/cmSeparateArgumentsCommand.cxx
parent69c0a5daf98958ba6ad4311781ec72fe8b9bfb0a (diff)
downloadCMake-79362cf11715ffc5acd48ec884559d69a35a655d.zip
CMake-79362cf11715ffc5acd48ec884559d69a35a655d.tar.gz
CMake-79362cf11715ffc5acd48ec884559d69a35a655d.tar.bz2
cmProp: cm::string_view cast operator must be explicit
To avoid ambiguity on std::string assigment between the following two cmProp cast operators: * operator const std::string&() const noexcept * operator cm::string_view() const noexcept
Diffstat (limited to 'Source/cmSeparateArgumentsCommand.cxx')
-rw-r--r--Source/cmSeparateArgumentsCommand.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmSeparateArgumentsCommand.cxx b/Source/cmSeparateArgumentsCommand.cxx
index 52b1a44..c2fc45c 100644
--- a/Source/cmSeparateArgumentsCommand.cxx
+++ b/Source/cmSeparateArgumentsCommand.cxx
@@ -4,6 +4,7 @@
#include <algorithm>
+#include <cm/string_view>
#include <cmext/string_view>
#include "cmArgumentParser.h"
@@ -81,7 +82,7 @@ bool cmSeparateArgumentsCommand(std::vector<std::string> const& args,
}
if (unparsedArguments.empty()) {
- status.GetMakefile().AddDefinition(var, {});
+ status.GetMakefile().AddDefinition(var, cm::string_view{});
return true;
}