]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/type_index/test/type_index_test_ctti_alignment.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / type_index / test / type_index_test_ctti_alignment.cpp
1 //
2 // Copyright Antony Polukhin, 2012-2015.
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See
5 // accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7
8 #include <boost/type_index/ctti_type_index.hpp>
9 #include <boost/type_traits/alignment_of.hpp>
10
11 int main() {
12 BOOST_STATIC_ASSERT_MSG(
13 boost::alignment_of<boost::typeindex::detail::ctti_data>::value == boost::alignment_of<char>::value,
14 "Alignments of boost::typeindex::detail::ctti_data and char differ. "
15 "It is unsafe to reinterpret_cast between them."
16 );
17 }
18