////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion GaztaƱaga 2004-2006. 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 "printcontainer.hpp" #include "set_test.hpp" /////////////////////////////////////////////////////////////////// // // // This example repeats the same operations with std::set and // // shmem_set using the node allocator // // and compares the values of both containers // // // /////////////////////////////////////////////////////////////////// //Explicit instantiation to detect compilation errors template class boost::interprocess::set, std::allocator >; template class boost::interprocess::multiset, std::allocator >; template class boost::interprocess::map, std::allocator > >; template class boost::interprocess::multimap, std::allocator > >; using namespace boost::interprocess; //Customize managed_shared_memory class typedef basic_managed_shared_memory , map_index > my_managed_shared_memory; //We will work with narrow characters for shared memory objects //Alias node allocator type typedef node_allocator shmem_node_allocator_t; //Alias set types typedef set, shmem_node_allocator_t> MyShmSet; typedef std::set MyStdSet; typedef multiset, shmem_node_allocator_t> MyShmMultiSet; typedef std::multiset MyStdMultiSet; int main () { using namespace boost::interprocess::detail; return test::set_test(); } #include