Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <fmt/format.h>
- #include <QUuid>
- namespace chatty {
- template <typename... Args>
- auto fS(Args &&... args) -> decltype(fmt::format(std::forward<Args>(args)...))
- {
- return fmt::format(std::forward<Args>(args)...);
- }
- static QString CreateUUID()
- {
- auto uuid = QUuid::createUuid();
- return uuid.toString();
- }
- } // namespace chatty
- namespace fmt {
- // format_arg for QString
- inline void format_arg(BasicFormatter<char> &f, const char *&, const QString &v)
- {
- f.writer().write("{}", v.toStdString());
- }
- } // namespace fmt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement