sp_has_gcc_intrinsics.hpp 786 B

123456789101112131415161718192021222324252627
  1. #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_GCC_INTRINSICS_HPP_INCLUDED
  2. #define BOOST_SMART_PTR_DETAIL_SP_HAS_GCC_INTRINSICS_HPP_INCLUDED
  3. // MS compatible compilers support #pragma once
  4. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  5. # pragma once
  6. #endif
  7. // boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp
  8. //
  9. // Copyright 2020 Peter Dimov
  10. // Distributed under the Boost Software License, Version 1.0.
  11. // https://www.boost.org/LICENSE_1_0.txt
  12. //
  13. // Defines the BOOST_SP_HAS_GCC_INTRINSICS macro if the __atomic_*
  14. // intrinsics are available.
  15. #if defined( __ATOMIC_RELAXED ) && defined( __ATOMIC_ACQUIRE ) && defined( __ATOMIC_RELEASE ) && defined( __ATOMIC_ACQ_REL )
  16. # define BOOST_SP_HAS_GCC_INTRINSICS
  17. #endif
  18. #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_GCC_INTRINSICS_HPP_INCLUDED