Modernize the alignment test

This commit is contained in:
Antony Polukhin
2024-01-07 14:49:28 +03:00
parent 43dd1e135a
commit e37bc99e85

View File

@ -6,11 +6,10 @@
// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/type_index/ctti_type_index.hpp>
#include <boost/type_traits/alignment_of.hpp>
int main() {
BOOST_STATIC_ASSERT_MSG(
boost::alignment_of<boost::typeindex::detail::ctti_data>::value == boost::alignment_of<char>::value,
static_assert(
alignof(boost::typeindex::detail::ctti_data) == alignof(char),
"Alignments of boost::typeindex::detail::ctti_data and char differ. "
"It is unsafe to reinterpret_cast between them."
);