1 //////////////////////////////////////////////////////////////////////////////
3 // (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
4 // Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 // See http://www.boost.org/libs/interprocess for documentation.
9 //////////////////////////////////////////////////////////////////////////////
11 #ifndef BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
12 #define BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
14 #ifndef BOOST_CONFIG_HPP
15 # include <boost/config.hpp>
18 #if defined(BOOST_HAS_PRAGMA_ONCE)
22 #ifndef BOOST_CONFIG_HPP
23 #include <boost/config.hpp>
26 // MSVC-12 ICEs when variadic templates are enabled.
27 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && (!defined(BOOST_MSVC) || BOOST_MSVC >= 1900)
28 #define BOOST_INTRUSIVE_VARIADIC_TEMPLATES
31 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
32 #define BOOST_INTRUSIVE_PERFECT_FORWARDING
35 //Macros for documentation purposes. For code, expands to the argument
36 #define BOOST_INTRUSIVE_IMPDEF(TYPE) TYPE
37 #define BOOST_INTRUSIVE_SEEDOC(TYPE) TYPE
38 #define BOOST_INTRUSIVE_DOC1ST(TYPE1, TYPE2) TYPE2
39 #define BOOST_INTRUSIVE_I ,
40 #define BOOST_INTRUSIVE_DOCIGN(T1) T1
42 //#define BOOST_INTRUSIVE_DISABLE_FORCEINLINE
44 #if defined(BOOST_INTRUSIVE_DISABLE_FORCEINLINE)
45 #define BOOST_INTRUSIVE_FORCEINLINE inline
46 #elif defined(BOOST_INTRUSIVE_FORCEINLINE_IS_BOOST_FORCELINE)
47 #define BOOST_INTRUSIVE_FORCEINLINE BOOST_FORCEINLINE
48 #elif defined(BOOST_MSVC) && (_MSC_VER < 1900 || defined(_DEBUG))
49 //"__forceinline" and MSVC seems to have some bugs in old versions and in debug mode
50 #define BOOST_INTRUSIVE_FORCEINLINE inline
51 #elif defined(BOOST_GCC) && (__GNUC__ <= 5)
52 //Older GCCs have problems with forceinline
53 #define BOOST_INTRUSIVE_FORCEINLINE inline
55 #define BOOST_INTRUSIVE_FORCEINLINE BOOST_FORCEINLINE
58 #endif //#ifndef BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP