diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-05-30 07:21:23 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-05-30 07:26:21 +0200 |
commit | 561b89409551119833acf7abbb77d4afd632a657 (patch) | |
tree | 7d8617875a958c37310ba2edab1f8e702d823d6a /compat/linkage-macros.hpp | |
parent | 9f1595131f15e47d12c6a633e45d8ef837bddd75 (diff) |
compat/linkage: extern template works on GNU now
Diffstat (limited to 'compat/linkage-macros.hpp')
-rw-r--r-- | compat/linkage-macros.hpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/compat/linkage-macros.hpp b/compat/linkage-macros.hpp index 9e71ac8c..967dfba9 100644 --- a/compat/linkage-macros.hpp +++ b/compat/linkage-macros.hpp @@ -11,5 +11,11 @@ # define OTR_GENERIC_IMPORT #endif -#define OTR_TEMPLATE_EXPORT template class OTR_GENERIC_EXPORT -#define OTR_TEMPLATE_IMPORT extern template class OTR_GENERIC_IMPORT +#define OTR_TEMPLATE_IMPORT(x) extern template class OTR_GENERIC_IMPORT x +#define OTR_TEMPLATE_EXPORT_(x) template class OTR_GENERIC_EXPORT x + +#if defined _MSC_VER +# define OTR_TEMPLATE_EXPORT OTR_TEMPLATE_EXPORT_ +#else +# define OTR_TEMPLATE_EXPORT OTR_TEMPLATE_EXPORT_ +#endif |