File indexing completed on 2025-01-18 09:30:30
0001 #ifndef BOOST_CORE_MAX_ALIGN_HPP_INCLUDED
0002 #define BOOST_CORE_MAX_ALIGN_HPP_INCLUDED
0003
0004
0005
0006 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
0007 # pragma once
0008 #endif
0009
0010
0011
0012
0013
0014 #include <boost/core/alignof.hpp>
0015 #include <boost/config.hpp>
0016 #include <cstddef>
0017
0018
0019
0020 #if defined(BOOST_HAS_FLOAT128)
0021
0022 # define BOOST_CORE_HAS_FLOAT128
0023
0024 #elif defined(__SIZEOF_FLOAT128__)
0025
0026 # define BOOST_CORE_HAS_FLOAT128
0027
0028 #elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 404) && defined(__i386__)
0029
0030 # define BOOST_CORE_HAS_FLOAT128
0031
0032 #endif
0033
0034
0035
0036 namespace boost
0037 {
0038 namespace core
0039 {
0040
0041 union max_align_t
0042 {
0043 char c;
0044 short s;
0045 int i;
0046 long l;
0047
0048 #if !defined(BOOST_NO_LONG_LONG)
0049
0050 boost::long_long_type ll;
0051
0052 #endif
0053
0054 #if defined(BOOST_HAS_INT128)
0055
0056 boost::int128_type i128;
0057
0058 #endif
0059
0060 float f;
0061 double d;
0062 long double ld;
0063
0064 #if defined(BOOST_CORE_HAS_FLOAT128)
0065
0066 __float128 f128;
0067
0068 #endif
0069
0070 void* p;
0071 void (*pf) ();
0072
0073 int max_align_t::* pm;
0074 void (max_align_t::*pmf)();
0075 };
0076
0077 BOOST_CONSTEXPR_OR_CONST std::size_t max_align = BOOST_CORE_ALIGNOF( max_align_t );
0078
0079 }
0080 }
0081
0082 #endif