From 680db66c3a78cd19bcd99ed99cc1973d73ff4dc6 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 3 Nov 2024 09:13:17 -0800 Subject: [PATCH] Explicitly export symbols from detail --- include/fmt/format.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 1c6415592c84..83bcf8509778 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -943,8 +943,6 @@ FMT_API auto write_console(int fd, string_view text) -> bool; FMT_API void print(FILE*, string_view); } // namespace detail -FMT_BEGIN_EXPORT - // Suppress a misleading warning in older versions of clang. FMT_PRAGMA_CLANG(diagnostic ignored "-Wweak-vtables") @@ -967,22 +965,17 @@ template struct fixed_string { // Converts a compile-time string to basic_string_view. template -constexpr auto compile_string_to_view(const Char (&s)[N]) +FMT_EXPORT 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 -constexpr auto compile_string_to_view(basic_string_view s) +FMT_EXPORT constexpr auto compile_string_to_view(basic_string_view s) -> basic_string_view { return s; } -} // namespace detail - -FMT_END_EXPORT - -namespace detail { // Returns true if value is negative, false otherwise. // Same as `value < 0` but doesn't produce warnings if T is an unsigned type.