FMT_MODULE_EXPORT_* -> FMT_EXPORT_*

This commit is contained in:
Victor Zverovich
2023-04-10 08:33:39 -07:00
parent 4613d48fd3
commit 1d0257e4c0
10 changed files with 29 additions and 28 deletions

View File

@@ -460,7 +460,7 @@ auto write(OutputIt out, const std::tm& time, const std::locale& loc,
} // namespace detail } // namespace detail
FMT_MODULE_EXPORT_BEGIN FMT_EXPORT_BEGIN
/** /**
Converts given time since epoch as ``std::time_t`` value into calendar time, 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 // Format subseconds which are given as a floating point type with an
// number of digits. We cannot pass the Duration here, as we explicitly need to // appropriate number of digits. We cannot pass the Duration here, as we
// pass the Rep value in the chrono_formatter. // explicitly need to pass the Rep value in the chrono_formatter.
template <typename Duration> template <typename Duration>
void write_floating_seconds(memory_buffer& buf, Duration duration, void write_floating_seconds(memory_buffer& buf, Duration duration,
int num_fractional_digits = -1) { int num_fractional_digits = -1) {
@@ -2288,7 +2288,7 @@ template <typename Char> struct formatter<std::tm, Char> {
} }
}; };
FMT_MODULE_EXPORT_END FMT_EXPORT_END
FMT_END_NAMESPACE FMT_END_NAMESPACE
#endif // FMT_CHRONO_H_ #endif // FMT_CHRONO_H_

View File

@@ -11,7 +11,7 @@
#include "format.h" #include "format.h"
FMT_BEGIN_NAMESPACE FMT_BEGIN_NAMESPACE
FMT_MODULE_EXPORT_BEGIN FMT_EXPORT_BEGIN
enum class color : uint32_t { enum class color : uint32_t {
alice_blue = 0xF0F8FF, // rgb(240,248,255) 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<remove_cvref_t<T>>{value, ts}; return detail::styled_arg<remove_cvref_t<T>>{value, ts};
} }
FMT_MODULE_EXPORT_END FMT_EXPORT_END
FMT_END_NAMESPACE FMT_END_NAMESPACE
#endif // FMT_COLOR_H_ #endif // FMT_COLOR_H_

View File

@@ -497,7 +497,7 @@ constexpr auto compile(S format_str) {
#endif // defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction) #endif // defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction)
} // namespace detail } // namespace detail
FMT_MODULE_EXPORT_BEGIN FMT_EXPORT_BEGIN
#if defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction) #if defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction)
@@ -601,7 +601,7 @@ template <detail_exported::fixed_string Str> constexpr auto operator""_cf() {
} // namespace literals } // namespace literals
#endif #endif
FMT_MODULE_EXPORT_END FMT_EXPORT_END
FMT_END_NAMESPACE FMT_END_NAMESPACE
#endif // FMT_COMPILE_H_ #endif // FMT_COMPILE_H_

View File

@@ -183,8 +183,8 @@
#ifndef FMT_MODULE_EXPORT #ifndef FMT_MODULE_EXPORT
# define FMT_MODULE_EXPORT # define FMT_MODULE_EXPORT
# define FMT_MODULE_EXPORT_BEGIN # define FMT_EXPORT_BEGIN
# define FMT_MODULE_EXPORT_END # define FMT_EXPORT_END
# define FMT_BEGIN_DETAIL_NAMESPACE namespace detail { # define FMT_BEGIN_DETAIL_NAMESPACE namespace detail {
# define FMT_END_DETAIL_NAMESPACE } # define FMT_END_DETAIL_NAMESPACE }
#endif #endif
@@ -262,7 +262,7 @@ FMT_GCC_PRAGMA("GCC optimize(\"Og\")")
#endif #endif
FMT_BEGIN_NAMESPACE FMT_BEGIN_NAMESPACE
FMT_MODULE_EXPORT_BEGIN FMT_EXPORT_BEGIN
// Implementations of enable_if_t and other metafunctions for older systems. // Implementations of enable_if_t and other metafunctions for older systems.
template <bool B, typename T = void> template <bool B, typename T = void>
@@ -2940,7 +2940,7 @@ FMT_INLINE void println(format_string<T...> fmt, T&&... args) {
return fmt::println(stdout, fmt, std::forward<T>(args)...); return fmt::println(stdout, fmt, std::forward<T>(args)...);
} }
FMT_MODULE_EXPORT_END FMT_EXPORT_END
FMT_GCC_PRAGMA("GCC pop_options") FMT_GCC_PRAGMA("GCC pop_options")
FMT_END_NAMESPACE FMT_END_NAMESPACE

View File

@@ -893,7 +893,7 @@ template <typename T>
struct is_locale<T, void_t<decltype(T::classic())>> : std::true_type {}; struct is_locale<T, void_t<decltype(T::classic())>> : std::true_type {};
} // namespace detail } // namespace detail
FMT_MODULE_EXPORT_BEGIN FMT_EXPORT_BEGIN
// The number of characters to store in the basic_memory_buffer object itself // The number of characters to store in the basic_memory_buffer object itself
// to avoid dynamic memory allocation. // to avoid dynamic memory allocation.
@@ -4678,7 +4678,7 @@ FMT_NODISCARD FMT_INLINE auto formatted_size(const Locale& loc,
return buf.count(); return buf.count();
} }
FMT_MODULE_EXPORT_END FMT_EXPORT_END
FMT_END_NAMESPACE FMT_END_NAMESPACE
#ifdef FMT_HEADER_ONLY #ifdef FMT_HEADER_ONLY

View File

@@ -71,7 +71,7 @@
#define FMT_RETRY(result, expression) FMT_RETRY_VAL(result, expression, -1) #define FMT_RETRY(result, expression) FMT_RETRY_VAL(result, expression, -1)
FMT_BEGIN_NAMESPACE FMT_BEGIN_NAMESPACE
FMT_MODULE_EXPORT_BEGIN FMT_EXPORT_BEGIN
/** /**
\rst \rst
@@ -338,10 +338,11 @@ class FMT_API file {
// this file object from the file. // this file object from the file.
buffered_file fdopen(const char* mode); buffered_file fdopen(const char* mode);
# if defined(_WIN32) && !defined(__MINGW32__) # if defined(_WIN32) && !defined(__MINGW32__)
// Opens a file and constructs a file object representing this file by wcstring_view filename. Windows only. // 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); static file open_windows_file(wcstring_view path, int oflag);
#endif # endif
}; };
// Returns the memory page size. // Returns the memory page size.
@@ -464,7 +465,7 @@ inline ostream output_file(cstring_view path, T... params) {
} }
#endif // FMT_USE_FCNTL #endif // FMT_USE_FCNTL
FMT_MODULE_EXPORT_END FMT_EXPORT_END
FMT_END_NAMESPACE FMT_END_NAMESPACE
#endif // FMT_OS_H_ #endif // FMT_OS_H_

View File

@@ -14,7 +14,7 @@
#include "format.h" #include "format.h"
FMT_BEGIN_NAMESPACE FMT_BEGIN_NAMESPACE
FMT_MODULE_EXPORT_BEGIN FMT_EXPORT_BEGIN
template <typename T> struct printf_formatter { printf_formatter() = delete; }; template <typename T> struct printf_formatter { printf_formatter() = delete; };
@@ -673,7 +673,7 @@ inline auto printf(const S& fmt, const T&... args) -> int {
fmt::make_format_args<basic_printf_context_t<char_t<S>>>(args...)); fmt::make_format_args<basic_printf_context_t<char_t<S>>>(args...));
} }
FMT_MODULE_EXPORT_END FMT_EXPORT_END
FMT_END_NAMESPACE FMT_END_NAMESPACE
#endif // FMT_PRINTF_H_ #endif // FMT_PRINTF_H_

View File

@@ -683,7 +683,7 @@ struct formatter<T, Char,
} }
}; };
FMT_MODULE_EXPORT_BEGIN FMT_EXPORT_BEGIN
/** /**
\rst \rst
@@ -726,7 +726,7 @@ auto join(std::initializer_list<T> list, string_view sep)
return join(std::begin(list), std::end(list), sep); return join(std::begin(list), std::end(list), sep);
} }
FMT_MODULE_EXPORT_END FMT_EXPORT_END
FMT_END_NAMESPACE FMT_END_NAMESPACE
#endif // FMT_RANGES_H_ #endif // FMT_RANGES_H_

View File

@@ -37,7 +37,7 @@ inline auto write_loc(std::back_insert_iterator<detail::buffer<wchar_t>> out,
} }
} // namespace detail } // namespace detail
FMT_MODULE_EXPORT_BEGIN FMT_EXPORT_BEGIN
using wstring_view = basic_string_view<wchar_t>; using wstring_view = basic_string_view<wchar_t>;
using wformat_parse_context = basic_format_parse_context<wchar_t>; using wformat_parse_context = basic_format_parse_context<wchar_t>;
@@ -253,7 +253,7 @@ template <typename... T> void println(wformat_string<T...> fmt, T&&... args) {
template <typename T> inline auto to_wstring(const T& value) -> std::wstring { template <typename T> inline auto to_wstring(const T& value) -> std::wstring {
return format(FMT_STRING(L"{}"), value); return format(FMT_STRING(L"{}"), value);
} }
FMT_MODULE_EXPORT_END FMT_EXPORT_END
FMT_END_NAMESPACE FMT_END_NAMESPACE
#endif // FMT_XCHAR_H_ #endif // FMT_XCHAR_H_

View File

@@ -71,8 +71,8 @@ module;
export module fmt; export module fmt;
#define FMT_MODULE_EXPORT export #define FMT_MODULE_EXPORT export
#define FMT_MODULE_EXPORT_BEGIN export { #define FMT_EXPORT_BEGIN export {
#define FMT_MODULE_EXPORT_END } #define FMT_EXPORT_END }
#define FMT_BEGIN_DETAIL_NAMESPACE \ #define FMT_BEGIN_DETAIL_NAMESPACE \
} \ } \
namespace detail { namespace detail {