From 3b9a3d26081f473309607f07bd04bfe026fa139d Mon Sep 17 00:00:00 2001 From: Cameron Angus Date: Wed, 4 Sep 2024 10:51:25 +0900 Subject: [PATCH 1/2] Avoid module export of member function definitions. --- include/fmt/base.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 4c00d729d9cb..1ff44c73ca00 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -2465,7 +2465,6 @@ inline void vprint_mojibake(FILE*, string_view, const format_args&, bool) {} } // namespace detail // The main public API. -FMT_BEGIN_EXPORT template FMT_CONSTEXPR void parse_context::do_check_arg_id(int arg_id) { @@ -2484,6 +2483,8 @@ FMT_CONSTEXPR void parse_context::check_dynamic_spec(int arg_id) { static_cast*>(this)->check_dynamic_spec(arg_id); } +FMT_BEGIN_EXPORT + // An output iterator that appends to a buffer. It is used instead of // back_insert_iterator to reduce symbol sizes and avoid dependency. template class basic_appender { From 38e959d9af1caf6fa154641684d58410d2668669 Mon Sep 17 00:00:00 2001 From: Cameron Angus Date: Wed, 4 Sep 2024 11:50:24 +0900 Subject: [PATCH 2/2] Do not #include intrinsics header into module purview. --- include/fmt/format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 5f83aad09433..122b62b5e4bb 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -196,7 +196,7 @@ FMT_END_NAMESPACE # endif #endif -#if FMT_MSC_VERSION +#if FMT_MSC_VERSION && !defined(FMT_MODULE) # include // _BitScanReverse[64], _BitScanForward[64], _umul128 #endif