]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/container/test/deque_options_test.cpp
bump version to 18.2.2-pve1
[ceph.git] / ceph / src / boost / libs / container / test / deque_options_test.cpp
1 //////////////////////////////////////////////////////////////////////////////
2 //
3 // (C) Copyright Ion Gaztanaga 2004-2013. Distributed under the Boost
4 // Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // See http://www.boost.org/libs/container for documentation.
8 //
9 //////////////////////////////////////////////////////////////////////////////
10 #include <boost/container/deque.hpp>
11 #include <boost/core/lightweight_test.hpp>
12
13 using namespace boost::container;
14
15 void test_block_bytes()
16 {
17 #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
18 using options_t = deque_options_t< block_bytes<128u> >;
19 #else
20 typedef deque_options< block_bytes<128u> >::type options_t;
21 #endif
22 typedef deque<unsigned short, void, options_t> deque_t;
23 BOOST_TEST(deque_t::get_block_size() == 128u/sizeof(unsigned short));
24 }
25
26 void test_block_elements()
27 {
28 #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
29 using options_t = deque_options_t< block_size<64> >;
30 #else
31 typedef deque_options< block_size<64 > >::type options_t;
32 #endif
33 typedef deque<unsigned char, void, options_t> deque_t;
34 BOOST_TEST(deque_t::get_block_size() == 64U);
35 }
36
37 int main()
38 {
39 test_block_bytes();
40 test_block_elements();
41 return ::boost::report_errors();
42 }