summaryrefslogtreecommitdiffhomepage
path: root/compat/linkage-macros.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'compat/linkage-macros.hpp')
-rw-r--r--compat/linkage-macros.hpp10
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