]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/container/test/deque_options_test.cpp
1 //////////////////////////////////////////////////////////////////////////////
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)
7 // See http://www.boost.org/libs/container for documentation.
9 //////////////////////////////////////////////////////////////////////////////
10 #include <boost/container/deque.hpp>
11 #include <boost/container/allocator.hpp>
12 #include <boost/core/lightweight_test.hpp>
14 using namespace boost::container
;
16 void test_block_bytes()
18 #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
19 using options_t
= deque_options_t
< block_bytes
<128u> >;
21 typedef deque_options
< block_bytes
<128u> >::type options_t
;
23 typedef deque
<unsigned short, void, options_t
> deque_t
;
24 BOOST_TEST(deque_t::get_block_size() == 128u/sizeof(unsigned short));
27 void test_block_elements()
29 #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
30 using options_t
= deque_options_t
< block_size
<64> >;
32 typedef deque_options
< block_size
<64 > >::type options_t
;
34 typedef deque
<unsigned char, void, options_t
> deque_t
;
35 BOOST_TEST(deque_t::get_block_size() == 64U);
41 test_block_elements();
42 return ::boost::report_errors();