diff --git a/core/base/inc/TColor.h b/core/base/inc/TColor.h index 1bce82e11ea26..4c68a6e1959b0 100644 --- a/core/base/inc/TColor.h +++ b/core/base/inc/TColor.h @@ -143,6 +143,10 @@ class TColorNumber { public: TColorNumber(Int_t color) : fNumber{color} {} TColorNumber(std::string const &color); + // We also require an overload for C-style strings. That's because the + // TColorNumber is designed to be constructed implicitly, and C++ won't do + // two user-defined conversions in a single implicit conversion chain. + inline TColorNumber(const char *color) : TColorNumber{std::string{color}} {} TColorNumber(std::array rgb); Int_t number() const { return fNumber; }