forked from boostorg/type_index
Modernize the alignment test
This commit is contained in:
@ -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."
|
||||
);
|
||||
|
Reference in New Issue
Block a user