From 66f6f54b5eb7823397dca41558bad02bad809e85 Mon Sep 17 00:00:00 2001 From: denchat <19730041+denchat@users.noreply.github.com> Date: Mon, 12 Apr 2021 11:53:59 +0700 Subject: [PATCH] D61118 : mark dllexport on extern template only D61118 : make dllexport on extern template, not the instantiation definition in format.cc [MinGW] Fix dllexport of explicit template instantiation https://reviews.llvm.org/D61118 --- include/fmt/format.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 890ecb16..5124e1ee 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -995,9 +995,7 @@ FMT_INLINE uint16_t bsr2log10(int bsr) { return data[bsr]; } -#ifndef FMT_EXPORTED -FMT_EXTERN template struct basic_data; -#endif +FMT_EXTERN template struct FMT_INSTANTIATION_DEF_API basic_data; // This is a struct rather than an alias to avoid shadowing warnings in gcc. struct data : basic_data<> {};