]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/interprocess/test/list_test.cpp
1 //////////////////////////////////////////////////////////////////////////////
3 // (C) Copyright Ion Gaztanaga 2004-2012. 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/interprocess for documentation.
9 //////////////////////////////////////////////////////////////////////////////
11 #include <boost/interprocess/detail/config_begin.hpp>
12 #include <boost/interprocess/managed_shared_memory.hpp>
13 #include <boost/interprocess/containers/list.hpp>
14 #include <boost/interprocess/allocators/allocator.hpp>
15 #include <boost/interprocess/offset_ptr.hpp>
16 #include "dummy_test_allocator.hpp"
17 #include "list_test.hpp"
18 #include "movable_int.hpp"
19 #include "emplace_test.hpp"
21 using namespace boost::interprocess
;
23 typedef allocator
<int, managed_shared_memory::segment_manager
> ShmemAllocator
;
24 typedef list
<int, ShmemAllocator
> MyList
;
26 //typedef allocator<volatile int, managed_shared_memory::segment_manager> ShmemVolatileAllocator;
27 //typedef list<volatile int, ShmemVolatileAllocator> MyVolatileList;
29 typedef allocator
<test::movable_int
, managed_shared_memory::segment_manager
> ShmemMoveAllocator
;
30 typedef list
<test::movable_int
, ShmemMoveAllocator
> MyMoveList
;
32 typedef allocator
<test::movable_and_copyable_int
, managed_shared_memory::segment_manager
> ShmemCopyMoveAllocator
;
33 typedef list
<test::movable_and_copyable_int
, ShmemCopyMoveAllocator
> MyCopyMoveList
;
35 typedef allocator
<test::copyable_int
, managed_shared_memory::segment_manager
> ShmemCopyAllocator
;
36 typedef list
<test::copyable_int
, ShmemCopyAllocator
> MyCopyList
;
40 if(test::list_test
<managed_shared_memory
, MyList
, true>())
43 // if(test::list_test<managed_shared_memory, MyVolatileList, true>())
46 if(test::list_test
<managed_shared_memory
, MyMoveList
, true>())
49 if(test::list_test
<managed_shared_memory
, MyCopyMoveList
, true>())
52 if(test::list_test
<managed_shared_memory
, MyCopyList
, true>())
55 const test::EmplaceOptions Options
= (test::EmplaceOptions
)(test::EMPLACE_BACK
| test::EMPLACE_FRONT
| test::EMPLACE_BEFORE
);
57 if(!boost::interprocess::test::test_emplace
<list
<test::EmplaceInt
>, Options
>())
63 #include <boost/interprocess/detail/config_end.hpp>