workaround.hpp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  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)
  6. //
  7. // See http://www.boost.org/libs/interprocess for documentation.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. #ifndef BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
  11. #define BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
  12. #ifndef BOOST_CONFIG_HPP
  13. # include <boost/config.hpp>
  14. #endif
  15. #if defined(BOOST_HAS_PRAGMA_ONCE)
  16. # pragma once
  17. #endif
  18. #ifndef BOOST_CONFIG_HPP
  19. #include <boost/config.hpp>
  20. #endif
  21. #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
  22. #define BOOST_INTRUSIVE_PERFECT_FORWARDING
  23. #endif
  24. //Macros for documentation purposes. For code, expands to the argument
  25. #define BOOST_INTRUSIVE_IMPDEF(TYPE) TYPE
  26. #define BOOST_INTRUSIVE_SEEDOC(TYPE) TYPE
  27. #define BOOST_INTRUSIVE_DOC1ST(TYPE1, TYPE2) TYPE2
  28. #define BOOST_INTRUSIVE_I ,
  29. #define BOOST_INTRUSIVE_DOCIGN(T1) T1
  30. //#define BOOST_INTRUSIVE_DISABLE_FORCEINLINE
  31. #if defined(BOOST_INTRUSIVE_DISABLE_FORCEINLINE)
  32. #define BOOST_INTRUSIVE_FORCEINLINE inline
  33. #elif defined(BOOST_INTRUSIVE_FORCEINLINE_IS_BOOST_FORCELINE)
  34. #define BOOST_INTRUSIVE_FORCEINLINE BOOST_FORCEINLINE
  35. #elif defined(BOOST_MSVC) && defined(_DEBUG)
  36. //"__forceinline" and MSVC seems to have some bugs in debug mode
  37. #define BOOST_INTRUSIVE_FORCEINLINE inline
  38. #elif defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ < 5)))
  39. //Older GCCs have problems with forceinline
  40. #define BOOST_INTRUSIVE_FORCEINLINE inline
  41. #else
  42. #define BOOST_INTRUSIVE_FORCEINLINE BOOST_FORCEINLINE
  43. #endif
  44. #endif //#ifndef BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP