mirror of
https://github.com/fmtlib/fmt.git
synced 2026-05-05 12:04:11 +02:00
Allow formatting C strings as pointers (#223)
This commit is contained in:
@@ -425,6 +425,8 @@ TEST(PrintfTest, Pointer) {
|
||||
int n;
|
||||
void *p = &n;
|
||||
EXPECT_PRINTF(fmt::format("{}", p), "%p", p);
|
||||
const char *s = "test";
|
||||
EXPECT_PRINTF(fmt::format("{:p}", s), "%p", s);
|
||||
}
|
||||
|
||||
TEST(PrintfTest, Custom) {
|
||||
|
||||
Reference in New Issue
Block a user