diff --git a/fmt/format.h b/fmt/format.h index 46e93c99..65ad328b 100644 --- a/fmt/format.h +++ b/fmt/format.h @@ -1277,7 +1277,9 @@ class MakeValue : public Arg { FMT_MAKE_VALUE(char *, string.value, CSTRING) FMT_MAKE_VALUE(const char *, string.value, CSTRING) + FMT_MAKE_VALUE(signed char *, sstring.value, CSTRING) FMT_MAKE_VALUE(const signed char *, sstring.value, CSTRING) + FMT_MAKE_VALUE(unsigned char *, ustring.value, CSTRING) FMT_MAKE_VALUE(const unsigned char *, ustring.value, CSTRING) FMT_MAKE_STR_VALUE(const std::string &, STRING) FMT_MAKE_STR_VALUE(StringRef, STRING) diff --git a/test/format-test.cc b/test/format-test.cc index 37d69350..6d246b93 100644 --- a/test/format-test.cc +++ b/test/format-test.cc @@ -1343,6 +1343,8 @@ TEST(FormatterTest, FormatUCharString) { EXPECT_EQ("test", format("{0:s}", str)); const unsigned char *const_str = str; EXPECT_EQ("test", format("{0:s}", const_str)); + unsigned char *ptr = str; + EXPECT_EQ("test", format("{0:s}", ptr)); } TEST(FormatterTest, FormatPointer) {