summaryrefslogtreecommitdiffstats
path: root/Source/cmProperty.h
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/cmProperty.h
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/cmProperty.h')
-rw-r--r--Source/cmProperty.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmProperty.h b/Source/cmProperty.h
index 3a0a5be..4179187 100644
--- a/Source/cmProperty.h
+++ b/Source/cmProperty.h
@@ -66,7 +66,10 @@ public:
explicit operator bool() const noexcept { return this->Value != nullptr; }
operator const std::string&() const noexcept { return this->operator*(); }
- operator cm::string_view() const noexcept { return this->operator*(); }
+ explicit operator cm::string_view() const noexcept
+ {
+ return this->operator*();
+ }
/**
* Does the value indicate a true or ON value?