mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-01 12:36:56 +00:00
this is a part of a series to migrating from `operator<<(ostream&, ..)` based formatting to fmtlib based formatting. the goal here is to enable fmtlib to print UUID without using ostream<<. also, this change reimplements some formatting helpers using fmtlib for better performance and less dependencies on operator<<(), but we cannot drop it at this moment, as quite a few caller sites are still using operator<<(ostream&, const UUID&) and operator<<(ostream&, tagged_uuid<T>&). we will address them separately. * add fmt::formatter<UUID> * add fmt::formatter<tagged_uuid<T>> * implement UUID::to_string() using fmt::to_string() * implement operator<<(std::ostream&, const UUID&) with fmt::print(), this should help to improve the performance when printing uuid, as fmt::print() does not materialize a string when printing the uuid. Refs #13245 Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
8.6 KiB
8.6 KiB