File indexing completed on 2025-01-30 09:33:48
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef BOOST_ATOMIC_DETAIL_ALIGNED_VARIABLE_HPP_INCLUDED_
0015 #define BOOST_ATOMIC_DETAIL_ALIGNED_VARIABLE_HPP_INCLUDED_
0016
0017 #include <boost/atomic/detail/config.hpp>
0018 #if defined(BOOST_ATOMIC_DETAIL_NO_CXX11_ALIGNAS)
0019 #include <boost/config/helper_macros.hpp>
0020 #include <boost/type_traits/type_with_alignment.hpp>
0021 #endif
0022 #include <boost/atomic/detail/header.hpp>
0023
0024 #ifdef BOOST_HAS_PRAGMA_ONCE
0025 #pragma once
0026 #endif
0027
0028 #if !defined(BOOST_ATOMIC_DETAIL_NO_CXX11_ALIGNAS)
0029
0030 #define BOOST_ATOMIC_DETAIL_ALIGNED_VAR(var_alignment, var_type, var_name) \
0031 alignas(var_alignment) var_type var_name
0032
0033 #define BOOST_ATOMIC_DETAIL_ALIGNED_VAR_TPL(var_alignment, var_type, var_name) \
0034 alignas(var_alignment) var_type var_name
0035
0036 #else
0037
0038
0039 #define BOOST_ATOMIC_DETAIL_ALIGNED_VAR(var_alignment, var_type, var_name) \
0040 union \
0041 { \
0042 var_type var_name; \
0043 boost::type_with_alignment< var_alignment >::type BOOST_JOIN(var_name, _aligner); \
0044 }
0045
0046 #define BOOST_ATOMIC_DETAIL_ALIGNED_VAR_TPL(var_alignment, var_type, var_name) \
0047 union \
0048 { \
0049 var_type var_name; \
0050 typename boost::type_with_alignment< var_alignment >::type BOOST_JOIN(var_name, _aligner); \
0051 }
0052
0053 #endif
0054
0055 #include <boost/atomic/detail/footer.hpp>
0056
0057 #endif