zstring: Support std::format
Change-Id: I8ea0a298e438fddb61573eb8e2349ecd125e60f1
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/zstring.cpp b/test/zstring.cpp
index 53c3a14..25ce5b0 100644
--- a/test/zstring.cpp
+++ b/test/zstring.cpp
@@ -2,6 +2,7 @@
#include <stdplus/zstring.hpp>
+#include <format>
#include <iostream>
#include <string>
#include <string_view>
@@ -39,6 +40,8 @@
std::cerr << const_zstring(as);
EXPECT_EQ("dd", fmt::format("d{}", zs));
EXPECT_EQ("dc", fmt::format("d{}", const_zstring(as)));
+ EXPECT_EQ("dd", std::format("d{}", zs));
+ EXPECT_EQ("dc", std::format("d{}", const_zstring(as)));
auto from_str = [&](const_zstring cs) { EXPECT_EQ(cs, "ac"); };
from_str("ac"s);