From 20b29c5ff56c605d52fb6e391c28daea26ab719a Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 28 Feb 2024 20:42:20 +0100 Subject: Core/Misc: Allow formatting optionals with Trinity::StringFormat --- src/common/Utilities/StringFormat.cpp | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/common/Utilities/StringFormat.cpp (limited to 'src/common/Utilities/StringFormat.cpp') diff --git a/src/common/Utilities/StringFormat.cpp b/src/common/Utilities/StringFormat.cpp new file mode 100644 index 00000000000..9550294fd64 --- /dev/null +++ b/src/common/Utilities/StringFormat.cpp @@ -0,0 +1,47 @@ +/* + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "StringFormat.h" +#include "Define.h" +#include + +// explicit template instantiations +template struct TC_COMMON_API fmt::formatter; +template struct TC_COMMON_API fmt::formatter; +template struct TC_COMMON_API fmt::formatter; +template struct TC_COMMON_API fmt::formatter; +template struct TC_COMMON_API fmt::formatter; +template struct TC_COMMON_API fmt::formatter; +template struct TC_COMMON_API fmt::formatter; +template struct TC_COMMON_API fmt::formatter; +template struct TC_COMMON_API fmt::formatter; +template struct TC_COMMON_API fmt::formatter; +template struct TC_COMMON_API fmt::formatter; +template struct TC_COMMON_API fmt::formatter>; + +template TC_COMMON_API fmt::appender fmt::formatter::format(int const&, format_context&) const; +template TC_COMMON_API fmt::appender fmt::formatter::format(unsigned const&, format_context&) const; +template TC_COMMON_API fmt::appender fmt::formatter::format(long long const&, format_context&) const; +template TC_COMMON_API fmt::appender fmt::formatter::format(unsigned long long const&, format_context&) const; +template TC_COMMON_API fmt::appender fmt::formatter::format(bool const&, format_context&) const; +template TC_COMMON_API fmt::appender fmt::formatter::format(char const&, format_context&) const; +template TC_COMMON_API fmt::appender fmt::formatter::format(float const&, format_context&) const; +template TC_COMMON_API fmt::appender fmt::formatter::format(double const&, format_context&) const; +template TC_COMMON_API fmt::appender fmt::formatter::format(long double const&, format_context&) const; +template TC_COMMON_API fmt::appender fmt::formatter::format(char const* const&, format_context&) const; +template TC_COMMON_API fmt::appender fmt::formatter::format(void const* const&, format_context &) const; +template TC_COMMON_API fmt::appender fmt::formatter::format(string_view const&, format_context &) const; -- cgit v1.2.3