================
@@ -168,8 +168,8 @@ class ConstString {
// Implicitly convert \class ConstString instances to \class StringRef.
operator llvm::StringRef() const { return GetStringRef(); }
- // Implicitly convert \class ConstString instances to \class
std::string_view.
- operator std::string_view() const {
+ // Explicitly convert \class ConstString instances to \class
std::string_view.
+ explicit operator std::string_view() const {
----------------
compnerd wrote:
How about flipping this to make `llvm::StringRef` the explicit conversion and
leave `std::string_view` the implicit one? This seems like it would be better
as we tend towards the standard types, which would make the eventual removal of
`StringRef` easier.
https://github.com/llvm/llvm-project/pull/84362
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits