////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// #include #include #include #include #include #include #include #include #include #include "allocator_v1.hpp" #include "heap_allocator_v1.hpp" #include "check_equal_containers.hpp" #include "movable_int.hpp" #include "expand_bwd_test_allocator.hpp" #include "expand_bwd_test_template.hpp" #include "dummy_test_allocator.hpp" #include "vector_test.hpp" using namespace boost::interprocess; //Explicit instantiation to detect compilation errors //template class stable_vector >; class recursive_vector { public: int id_; stable_vector vector_; }; void recursive_vector_test()//Test for recursive types { stable_vector recursive_vector_vector; } int main() { recursive_vector_test(); { //Now test move semantics stable_vector original; stable_vector move_ctor(boost::interprocess::move(original)); stable_vector move_assign; move_assign = boost::interprocess::move(move_ctor); move_assign.swap(original); } typedef allocator ShmemAllocator; typedef stable_vector MyVector; typedef test::allocator_v1 ShmemV1Allocator; typedef stable_vector MyV1Vector; typedef test::heap_allocator_v1 ShmemHeapV1Allocator; typedef stable_vector MyHeapV1Vector; typedef allocator ShmemMoveAllocator; typedef stable_vector MyMoveVector; typedef allocator ShmemCopyMoveAllocator; typedef stable_vector MyCopyMoveVector; if(test::vector_test()) return 1; if(test::vector_test()) return 1; if(test::vector_test()) return 1; if(test::vector_test()) return 1; if(test::vector_test()) return 1; const test::EmplaceOptions Options = (test::EmplaceOptions)(test::EMPLACE_BACK | test::EMPLACE_BEFORE); if(!boost::interprocess::test::test_emplace < stable_vector, Options>()) return 1; return 0; } #include