We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b7afbb6 commit 55dff8cCopy full SHA for 55dff8c
core/base/inc/TString.h
@@ -275,7 +275,9 @@ friend Bool_t operator==(const TString &s1, const char *s2);
275
276
// Type conversion
277
operator const char*() const { return GetPointer(); }
278
-#if __cplusplus >= 201700L
+#if (__cplusplus >= 201700L) && (!defined(__clang_major__) || __clang_major__ > 5)
279
+ // Clang 5.0 support for explicit conversion is still inadequate even in c++17 mode.
280
+ // (It leads to extraneous ambiguous overload errors)
281
explicit operator std::string() const { return std::string(GetPointer(),Length()); }
282
explicit operator ROOT::Internal::TStringView() const { return ROOT::Internal::TStringView(GetPointer(),Length()); }
283
operator std::string_view() const { return std::string_view(GetPointer(),Length()); }
0 commit comments