From 4b8ea7dc44f46e6f879104546d1890d00750588c Mon Sep 17 00:00:00 2001 From: denchat <19730041+denchat@users.noreply.github.com> Date: Sun, 18 Apr 2021 12:11:55 +0700 Subject: [PATCH] Added FMT_INSTANTIATION_DECL_API - Added FMT_INSTANTIATION_DECL_API - Added non-msvc filter - Added msvc non-export filter --- include/fmt/format.h | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 3d340ea8..d21c4b6a 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -3887,31 +3887,31 @@ extern template int snprintf_float(long double value, int precision, float_specs specs, buffer& buf); -#ifndef _MSC_VER -extern template const uint64_t basic_data::powers_of_10_64[]; -extern template const uint32_t basic_data::zero_or_powers_of_10_32_new[]; -extern template const uint64_t basic_data::zero_or_powers_of_10_64_new[]; -extern template const uint64_t basic_data::grisu_pow10_significands[]; -extern template const int16_t basic_data::grisu_pow10_exponents[]; -extern template const divtest_table_entry basic_data::divtest_table_for_pow5_32[]; -extern template const divtest_table_entry basic_data::divtest_table_for_pow5_64[]; -extern template const uint64_t basic_data::dragonbox_pow10_significands_64[]; -extern template const uint128_wrapper basic_data::dragonbox_pow10_significands_128[]; +#if !defined(FMT_EXPORTED) || !defined(_MSC_VER) +extern template FMT_INSTANTIATION_DECL_API const uint64_t basic_data::powers_of_10_64[]; +extern template FMT_INSTANTIATION_DECL_API const uint32_t basic_data::zero_or_powers_of_10_32_new[]; +extern template FMT_INSTANTIATION_DECL_API const uint64_t basic_data::zero_or_powers_of_10_64_new[]; +extern template FMT_INSTANTIATION_DECL_API const uint64_t basic_data::grisu_pow10_significands[]; +extern template FMT_INSTANTIATION_DECL_API const int16_t basic_data::grisu_pow10_exponents[]; +extern template FMT_INSTANTIATION_DECL_API const divtest_table_entry basic_data::divtest_table_for_pow5_32[]; +extern template FMT_INSTANTIATION_DECL_API const divtest_table_entry basic_data::divtest_table_for_pow5_64[]; +extern template FMT_INSTANTIATION_DECL_API const uint64_t basic_data::dragonbox_pow10_significands_64[]; +extern template FMT_INSTANTIATION_DECL_API const uint128_wrapper basic_data::dragonbox_pow10_significands_128[]; # if !FMT_USE_FULL_CACHE_DRAGONBOX -extern template const uint64_t basic_data::powers_of_5_64[]; -extern template const uint32_t basic_data::dragonbox_pow10_recovery_errors[]; +extern template FMT_INSTANTIATION_DECL_API const uint64_t basic_data::powers_of_5_64[]; +extern template FMT_INSTANTIATION_DECL_API const uint32_t basic_data::dragonbox_pow10_recovery_errors[]; # endif // GCC generates slightly better code for pairs than chars. -extern template const basic_data::digit_pair basic_data::digits[]; -extern template const char basic_data::foreground_color[]; -extern template const char basic_data::background_color[]; -extern template const char basic_data::reset_color[5]; -extern template const wchar_t basic_data::wreset_color[5]; -extern template const char basic_data::signs[]; +extern template FMT_INSTANTIATION_DECL_API const basic_data::digit_pair basic_data::digits[]; +extern template FMT_INSTANTIATION_DECL_API const char basic_data::foreground_color[]; +extern template FMT_INSTANTIATION_DECL_API const char basic_data::background_color[]; +extern template FMT_INSTANTIATION_DECL_API const char basic_data::reset_color[5]; +extern template FMT_INSTANTIATION_DECL_API const wchar_t basic_data::wreset_color[5]; +extern template FMT_INSTANTIATION_DECL_API const char basic_data::signs[]; // DEPRECATED! These are for ABI compatibility. -extern template const uint32_t basic_data::zero_or_powers_of_10_32[]; -extern template const uint64_t basic_data::zero_or_powers_of_10_64[]; -#endif // #ifndef _MSC_VER +extern template FMT_INSTANTIATION_DECL_API const uint32_t basic_data::zero_or_powers_of_10_32[]; +extern template FMT_INSTANTIATION_DECL_API const uint64_t basic_data::zero_or_powers_of_10_64[]; +#endif // #if !defined(FMT_EXPORTED) || !defined(MSC_VER_) } // namespace detail #endif