add fS function to simplify string formatting with fmt::format
This commit is contained in:
+2
-1
@@ -170,7 +170,8 @@ HEADERS += \
|
|||||||
src/widgets/splitcontainer.hpp \
|
src/widgets/splitcontainer.hpp \
|
||||||
src/widgets/helper/droppreview.hpp \
|
src/widgets/helper/droppreview.hpp \
|
||||||
src/widgets/helper/splitcolumn.hpp \
|
src/widgets/helper/splitcolumn.hpp \
|
||||||
src/util/irchelpers.hpp
|
src/util/irchelpers.hpp \
|
||||||
|
src/util/helpers.hpp
|
||||||
|
|
||||||
|
|
||||||
PRECOMPILED_HEADER =
|
PRECOMPILED_HEADER =
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <fmt/format.h>
|
||||||
|
|
||||||
|
namespace chatterino {
|
||||||
|
|
||||||
|
template <typename... Args>
|
||||||
|
auto fS(Args &&... args) -> decltype(fmt::format(std::forward<Args>(args)...))
|
||||||
|
{
|
||||||
|
return fmt::format(std::forward<Args>(args)...);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace chatterino
|
||||||
Reference in New Issue
Block a user