Added user-defined literal for call to format()

This commit is contained in:
2021-11-25 14:03:50 +01:00
parent 3f46775b35
commit 7743c95631
2 changed files with 15 additions and 1 deletions

View File

@@ -4,7 +4,7 @@
int main() {
constexpr auto formatted = format<"Test: {:012.5} {} {:8}">(142.4334, "abcdef", -1234);
constexpr auto formatted = "Test: {:012.5} {:6} {:8}"_const_fmt(142.4334, "abcdef", -1234);
for (const auto& c : formatted)
std::cout << c;