]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/align/test/is_aligned_test.cpp
ccc8c86e00db0b788ee9f4c6cf895b613420dcaa
2 (c) 2014-2015 Glen Joseph Fernandes
3 <glenjofe -at- gmail.com>
5 Distributed under the Boost Software
7 http://boost.org/LICENSE_1_0.txt
9 #include <boost/align/alignment_of.hpp>
10 #include <boost/align/is_aligned.hpp>
11 #include <boost/core/lightweight_test.hpp>
12 #include <boost/config.hpp>
14 template<std::size_t N
>
17 template<class T
, std::size_t N
>
20 BOOST_TEST(boost::alignment::is_aligned(p
, N
));
21 BOOST_TEST(!boost::alignment::is_aligned((char*)p
+ 1, N
));
27 BOOST_TEST(boost::alignment::is_aligned(p
, 1));
34 test(&o
, A
<boost::alignment::alignment_of
<T
>::value
>());
44 #if !defined(BOOST_NO_CXX11_CHAR16_T)
47 #if !defined(BOOST_NO_CXX11_CHAR32_T)
53 #if !defined(BOOST_NO_LONG_LONG) && !defined(_MSC_VER)
57 #if !defined(_MSC_VER)
66 #if !defined(_MSC_VER)
71 return boost::report_errors();