config.hpp 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Copyright 2008-2022 Emil Dotchevski and Reverge Studios, Inc.
  2. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  3. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. #ifndef BOOST_QVM_CONFIG_HPP_INCLUDED
  5. #define BOOST_QVM_CONFIG_HPP_INCLUDED
  6. #if defined( BOOST_STRICT_CONFIG ) || defined( BOOST_QVM_NO_WORKAROUNDS )
  7. # define BOOST_QVM_WORKAROUND( symbol, test ) 0
  8. #else
  9. # define BOOST_QVM_WORKAROUND( symbol, test ) ((symbol) != 0 && ((symbol) test))
  10. #endif
  11. #define BOOST_QVM_CLANG 0
  12. #if defined(__clang__)
  13. # undef BOOST_QVM_CLANG
  14. # define BOOST_QVM_CLANG (__clang_major__ * 100 + __clang_minor__)
  15. #endif
  16. #if BOOST_QVM_WORKAROUND( BOOST_QVM_CLANG, < 304 )
  17. # define BOOST_QVM_DEPRECATED(msg)
  18. #elif defined(__GNUC__) || defined(__clang__)
  19. # define BOOST_QVM_DEPRECATED(msg) __attribute__((deprecated(msg)))
  20. #elif defined(_MSC_VER) && _MSC_VER >= 1900
  21. # define BOOST_QVM_DEPRECATED(msg) [[deprecated(msg)]]
  22. #else
  23. # define BOOST_QVM_DEPRECATED(msg)
  24. #endif
  25. #ifndef BOOST_QVM_FORCEINLINE
  26. # if defined(_MSC_VER)
  27. # define BOOST_QVM_FORCEINLINE __forceinline
  28. # elif defined(__GNUC__) && __GNUC__>3
  29. # define BOOST_QVM_FORCEINLINE inline __attribute__ ((always_inline))
  30. # else
  31. # define BOOST_QVM_FORCEINLINE inline
  32. # endif
  33. #endif
  34. #ifndef BOOST_QVM_INLINE
  35. # define BOOST_QVM_INLINE inline
  36. #endif
  37. #ifndef BOOST_QVM_INLINE_TRIVIAL
  38. # define BOOST_QVM_INLINE_TRIVIAL BOOST_QVM_FORCEINLINE
  39. #endif
  40. #ifndef BOOST_QVM_INLINE_CRITICAL
  41. # define BOOST_QVM_INLINE_CRITICAL BOOST_QVM_FORCEINLINE
  42. #endif
  43. #ifndef BOOST_QVM_INLINE_OPERATIONS
  44. # define BOOST_QVM_INLINE_OPERATIONS BOOST_QVM_INLINE
  45. #endif
  46. #ifndef BOOST_QVM_INLINE_RECURSION
  47. # define BOOST_QVM_INLINE_RECURSION BOOST_QVM_INLINE_OPERATIONS
  48. #endif
  49. #ifndef BOOST_QVM_CONSTEXPR
  50. # if __cplusplus >= 201703L
  51. # define BOOST_QVM_CONSTEXPR constexpr
  52. # else
  53. # define BOOST_QVM_CONSTEXPR
  54. # endif
  55. #endif
  56. #endif