summaryrefslogtreecommitdiff
path: root/boost/container/detail/workaround.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/container/detail/workaround.hpp')
-rw-r--r--boost/container/detail/workaround.hpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/boost/container/detail/workaround.hpp b/boost/container/detail/workaround.hpp
index 026e65d6bb..e1f6156964 100644
--- a/boost/container/detail/workaround.hpp
+++ b/boost/container/detail/workaround.hpp
@@ -19,8 +19,6 @@
# pragma once
#endif
-#include <boost/container/detail/config_begin.hpp>
-
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)\
&& !defined(BOOST_INTERPROCESS_DISABLE_VARIADIC_TMPL)
#define BOOST_CONTAINER_PERFECT_FORWARDING
@@ -59,6 +57,23 @@
#define BOOST_CONTAINER_DOCIGN(T) T
#define BOOST_CONTAINER_DOCONLY(T)
-#include <boost/container/detail/config_end.hpp>
+/*
+ we need to import/export our code only if the user has specifically
+ asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
+ libraries to be dynamically linked, or BOOST_CONTAINER_DYN_LINK
+ if they want just this one to be dynamically liked:
+*/
+#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CONTAINER_DYN_LINK)
+
+ /* export if this is our own source, otherwise import: */
+ #ifdef BOOST_CONTAINER_SOURCE
+ # define BOOST_CONTAINER_DECL BOOST_SYMBOL_EXPORT
+ #else
+ # define BOOST_CONTAINER_DECL BOOST_SYMBOL_IMPORT
+
+ #endif /* BOOST_CONTAINER_SOURCE */
+#else
+ #define BOOST_CONTAINER_DECL
+#endif /* DYN_LINK */
#endif //#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP