diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 11565d63..dc780b4b 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -460,7 +460,7 @@ auto write(OutputIt out, const std::tm& time, const std::locale& loc, } // namespace detail -FMT_MODULE_EXPORT_BEGIN +FMT_EXPORT_BEGIN /** Converts given time since epoch as ``std::time_t`` value into calendar time, @@ -1156,9 +1156,9 @@ void write_fractional_seconds(OutputIt& out, Duration d, int precision = -1) { } } -// Format subseconds which are given as a floating point type with an appropriate -// number of digits. We cannot pass the Duration here, as we explicitly need to -// pass the Rep value in the chrono_formatter. +// Format subseconds which are given as a floating point type with an +// appropriate number of digits. We cannot pass the Duration here, as we +// explicitly need to pass the Rep value in the chrono_formatter. template void write_floating_seconds(memory_buffer& buf, Duration duration, int num_fractional_digits = -1) { @@ -2288,7 +2288,7 @@ template struct formatter { } }; -FMT_MODULE_EXPORT_END +FMT_EXPORT_END FMT_END_NAMESPACE #endif // FMT_CHRONO_H_ diff --git a/include/fmt/color.h b/include/fmt/color.h index 7647d516..dbb2cefb 100644 --- a/include/fmt/color.h +++ b/include/fmt/color.h @@ -11,7 +11,7 @@ #include "format.h" FMT_BEGIN_NAMESPACE -FMT_MODULE_EXPORT_BEGIN +FMT_EXPORT_BEGIN enum class color : uint32_t { alice_blue = 0xF0F8FF, // rgb(240,248,255) @@ -627,7 +627,7 @@ FMT_CONSTEXPR auto styled(const T& value, text_style ts) return detail::styled_arg>{value, ts}; } -FMT_MODULE_EXPORT_END +FMT_EXPORT_END FMT_END_NAMESPACE #endif // FMT_COLOR_H_ diff --git a/include/fmt/compile.h b/include/fmt/compile.h index 6555fd78..1180eab9 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -497,7 +497,7 @@ constexpr auto compile(S format_str) { #endif // defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction) } // namespace detail -FMT_MODULE_EXPORT_BEGIN +FMT_EXPORT_BEGIN #if defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction) @@ -601,7 +601,7 @@ template constexpr auto operator""_cf() { } // namespace literals #endif -FMT_MODULE_EXPORT_END +FMT_EXPORT_END FMT_END_NAMESPACE #endif // FMT_COMPILE_H_ diff --git a/include/fmt/core.h b/include/fmt/core.h index 364c03d4..19bc46c8 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -183,8 +183,8 @@ #ifndef FMT_MODULE_EXPORT # define FMT_MODULE_EXPORT -# define FMT_MODULE_EXPORT_BEGIN -# define FMT_MODULE_EXPORT_END +# define FMT_EXPORT_BEGIN +# define FMT_EXPORT_END # define FMT_BEGIN_DETAIL_NAMESPACE namespace detail { # define FMT_END_DETAIL_NAMESPACE } #endif @@ -262,7 +262,7 @@ FMT_GCC_PRAGMA("GCC optimize(\"Og\")") #endif FMT_BEGIN_NAMESPACE -FMT_MODULE_EXPORT_BEGIN +FMT_EXPORT_BEGIN // Implementations of enable_if_t and other metafunctions for older systems. template @@ -2940,7 +2940,7 @@ FMT_INLINE void println(format_string fmt, T&&... args) { return fmt::println(stdout, fmt, std::forward(args)...); } -FMT_MODULE_EXPORT_END +FMT_EXPORT_END FMT_GCC_PRAGMA("GCC pop_options") FMT_END_NAMESPACE diff --git a/include/fmt/format.h b/include/fmt/format.h index 6680b380..44a834fe 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -893,7 +893,7 @@ template struct is_locale> : std::true_type {}; } // namespace detail -FMT_MODULE_EXPORT_BEGIN +FMT_EXPORT_BEGIN // The number of characters to store in the basic_memory_buffer object itself // to avoid dynamic memory allocation. @@ -4678,7 +4678,7 @@ FMT_NODISCARD FMT_INLINE auto formatted_size(const Locale& loc, return buf.count(); } -FMT_MODULE_EXPORT_END +FMT_EXPORT_END FMT_END_NAMESPACE #ifdef FMT_HEADER_ONLY diff --git a/include/fmt/os.h b/include/fmt/os.h index e39f38cd..97d9d25d 100644 --- a/include/fmt/os.h +++ b/include/fmt/os.h @@ -71,7 +71,7 @@ #define FMT_RETRY(result, expression) FMT_RETRY_VAL(result, expression, -1) FMT_BEGIN_NAMESPACE -FMT_MODULE_EXPORT_BEGIN +FMT_EXPORT_BEGIN /** \rst @@ -338,10 +338,11 @@ class FMT_API file { // this file object from the file. buffered_file fdopen(const char* mode); - # if defined(_WIN32) && !defined(__MINGW32__) - // Opens a file and constructs a file object representing this file by wcstring_view filename. Windows only. +# if defined(_WIN32) && !defined(__MINGW32__) + // Opens a file and constructs a file object representing this file by + // wcstring_view filename. Windows only. static file open_windows_file(wcstring_view path, int oflag); - #endif +# endif }; // Returns the memory page size. @@ -464,7 +465,7 @@ inline ostream output_file(cstring_view path, T... params) { } #endif // FMT_USE_FCNTL -FMT_MODULE_EXPORT_END +FMT_EXPORT_END FMT_END_NAMESPACE #endif // FMT_OS_H_ diff --git a/include/fmt/printf.h b/include/fmt/printf.h index cae051d7..bcb2dd3e 100644 --- a/include/fmt/printf.h +++ b/include/fmt/printf.h @@ -14,7 +14,7 @@ #include "format.h" FMT_BEGIN_NAMESPACE -FMT_MODULE_EXPORT_BEGIN +FMT_EXPORT_BEGIN template struct printf_formatter { printf_formatter() = delete; }; @@ -673,7 +673,7 @@ inline auto printf(const S& fmt, const T&... args) -> int { fmt::make_format_args>>(args...)); } -FMT_MODULE_EXPORT_END +FMT_EXPORT_END FMT_END_NAMESPACE #endif // FMT_PRINTF_H_ diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h index dd8f082d..211bc84b 100644 --- a/include/fmt/ranges.h +++ b/include/fmt/ranges.h @@ -683,7 +683,7 @@ struct formatter list, string_view sep) return join(std::begin(list), std::end(list), sep); } -FMT_MODULE_EXPORT_END +FMT_EXPORT_END FMT_END_NAMESPACE #endif // FMT_RANGES_H_ diff --git a/include/fmt/xchar.h b/include/fmt/xchar.h index 5a57c519..360ab759 100644 --- a/include/fmt/xchar.h +++ b/include/fmt/xchar.h @@ -37,7 +37,7 @@ inline auto write_loc(std::back_insert_iterator> out, } } // namespace detail -FMT_MODULE_EXPORT_BEGIN +FMT_EXPORT_BEGIN using wstring_view = basic_string_view; using wformat_parse_context = basic_format_parse_context; @@ -253,7 +253,7 @@ template void println(wformat_string fmt, T&&... args) { template inline auto to_wstring(const T& value) -> std::wstring { return format(FMT_STRING(L"{}"), value); } -FMT_MODULE_EXPORT_END +FMT_EXPORT_END FMT_END_NAMESPACE #endif // FMT_XCHAR_H_ diff --git a/src/fmt.cc b/src/fmt.cc index 80e77e26..7823e825 100644 --- a/src/fmt.cc +++ b/src/fmt.cc @@ -71,8 +71,8 @@ module; export module fmt; #define FMT_MODULE_EXPORT export -#define FMT_MODULE_EXPORT_BEGIN export { -#define FMT_MODULE_EXPORT_END } +#define FMT_EXPORT_BEGIN export { +#define FMT_EXPORT_END } #define FMT_BEGIN_DETAIL_NAMESPACE \ } \ namespace detail {