From a6c45dfea8030817c07d8020113702eba54cdaf5 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 10 Nov 2024 09:06:50 -0800 Subject: [PATCH] Fix modular build --- include/fmt/format.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 3c05ac1d..5221d831 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -937,12 +937,6 @@ template struct is_contiguous> : std::true_type { }; -FMT_END_EXPORT -namespace detail { -FMT_API auto write_console(int fd, string_view text) -> bool; -FMT_API void print(FILE*, string_view); -} // namespace detail - // Suppress a misleading warning in older versions of clang. FMT_PRAGMA_CLANG(diagnostic ignored "-Wweak-vtables") @@ -954,6 +948,12 @@ class FMT_SO_VISIBILITY("default") format_error : public std::runtime_error { class loc_value; +FMT_END_EXPORT +namespace detail { +FMT_API auto write_console(int fd, string_view text) -> bool; +FMT_API void print(FILE*, string_view); +} // namespace detail + namespace detail { template struct fixed_string { FMT_CONSTEXPR20 fixed_string(const Char (&s)[N]) { @@ -964,15 +964,15 @@ template struct fixed_string { }; // Converts a compile-time string to basic_string_view. -template -FMT_EXPORT constexpr auto compile_string_to_view(const Char (&s)[N]) +FMT_EXPORT template +constexpr auto compile_string_to_view(const Char (&s)[N]) -> basic_string_view { // Remove trailing NUL character if needed. Won't be present if this is used // with a raw character array (i.e. not defined as a string). return {s, N - (std::char_traits::to_int_type(s[N - 1]) == 0 ? 1 : 0)}; } -template -FMT_EXPORT constexpr auto compile_string_to_view(basic_string_view s) +FMT_EXPORT template +constexpr auto compile_string_to_view(basic_string_view s) -> basic_string_view { return s; }