diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-09-13 14:55:00 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2021-09-14 15:42:02 (GMT) |
commit | 79362cf11715ffc5acd48ec884559d69a35a655d (patch) | |
tree | f2d2f64b5949f3e23acd80a12c2f21c096c08b48 /Source/cmProperty.h | |
parent | 69c0a5daf98958ba6ad4311781ec72fe8b9bfb0a (diff) | |
download | CMake-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.h | 5 |
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? |