Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-05 08:48:46

0001 #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_GCC_INTRINSICS_HPP_INCLUDED
0002 #define BOOST_SMART_PTR_DETAIL_SP_HAS_GCC_INTRINSICS_HPP_INCLUDED
0003 
0004 // MS compatible compilers support #pragma once
0005 
0006 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
0007 # pragma once
0008 #endif
0009 
0010 
0011 // boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp
0012 //
0013 // Copyright 2020 Peter Dimov
0014 // Distributed under the Boost Software License, Version 1.0.
0015 // https://www.boost.org/LICENSE_1_0.txt
0016 //
0017 // Defines the BOOST_SP_HAS_GCC_INTRINSICS macro if the __atomic_*
0018 // intrinsics are available.
0019 
0020 // Libraries (e.g. Kokkos) sometimes define the __ATOMIC_RELAXED macros,
0021 // leading to errors under MSVC (https://github.com/boostorg/smart_ptr/pull/112)
0022 
0023 #if defined( __ATOMIC_RELAXED ) && defined( __ATOMIC_ACQUIRE ) && defined( __ATOMIC_RELEASE ) && defined( __ATOMIC_ACQ_REL ) \
0024     && !( defined(_MSC_VER) && !defined(__clang__) )
0025 
0026 # define BOOST_SP_HAS_GCC_INTRINSICS
0027 
0028 #endif
0029 
0030 #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_GCC_INTRINSICS_HPP_INCLUDED