terminal/dep/fmt/include/fmt
Dustin L. Howett 114e462669
Import fmtlib/fmt@6.2.0, a C++20-style format library (#5336)
We received a request from our localization team to switch from
printf-style format strings (%s, %u) to format strings with positional
argument support. I've been hoping for a long time to take a dependency
on C++20's std::format, but we're just not somewhere we can do that.
Enter fmt. fmt is _exactly_ the library we need.

Minor comparison:

std::wstring_view world = /* ... */;
auto str{ wil::str_printf<std::wstring>(L"hello %.*s",
	   gsl::narrow_cast<size_t>(world.size()),
	   world.data()) };

---

auto str{ fmt::format(L"hello {0}", world) };

If you really want to use the print specifiers:

auto str{ fmt::printf(L"hello %s", world) };

It's got optional compile-time checking for format strings and is
MIT-licensed. Eventually, we should be able to replace fmt:: with std::
and end up pretty much where we left off.
What more could you ask for?
2020-04-14 13:04:23 -07:00
..
chrono.h Import fmtlib/fmt@6.2.0, a C++20-style format library (#5336) 2020-04-14 13:04:23 -07:00
color.h Import fmtlib/fmt@6.2.0, a C++20-style format library (#5336) 2020-04-14 13:04:23 -07:00
compile.h Import fmtlib/fmt@6.2.0, a C++20-style format library (#5336) 2020-04-14 13:04:23 -07:00
core.h Import fmtlib/fmt@6.2.0, a C++20-style format library (#5336) 2020-04-14 13:04:23 -07:00
format-inl.h Import fmtlib/fmt@6.2.0, a C++20-style format library (#5336) 2020-04-14 13:04:23 -07:00
format.h Import fmtlib/fmt@6.2.0, a C++20-style format library (#5336) 2020-04-14 13:04:23 -07:00
locale.h Import fmtlib/fmt@6.2.0, a C++20-style format library (#5336) 2020-04-14 13:04:23 -07:00
os.h Import fmtlib/fmt@6.2.0, a C++20-style format library (#5336) 2020-04-14 13:04:23 -07:00
ostream.h Import fmtlib/fmt@6.2.0, a C++20-style format library (#5336) 2020-04-14 13:04:23 -07:00
posix.h Import fmtlib/fmt@6.2.0, a C++20-style format library (#5336) 2020-04-14 13:04:23 -07:00
printf.h Import fmtlib/fmt@6.2.0, a C++20-style format library (#5336) 2020-04-14 13:04:23 -07:00
ranges.h Import fmtlib/fmt@6.2.0, a C++20-style format library (#5336) 2020-04-14 13:04:23 -07:00