// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
-#include <boost/interprocess/detail/config_begin.hpp>
+
#include <boost/interprocess/detail/workaround.hpp>
//[doc_managed_heap_memory
#include <boost/interprocess/containers/list.hpp>
managed_heap_memory::handle_t list_handle = heap_memory.get_handle_from_address(mylist);
//Fill list until there is no more memory in the buffer
- try{
+ BOOST_TRY{
while(1) {
mylist->insert(mylist->begin(), 0);
}
}
- catch(const bad_alloc &){
+ BOOST_CATCH(const bad_alloc &){
//memory is full
- }
+ } BOOST_CATCH_END
//Let's obtain the size of the list
MyList::size_type old_size = mylist->size();
//<-
(heap_memory.get_address_from_handle(list_handle));
//Fill list until there is no more memory in the buffer
- try{
+ BOOST_TRY{
while(1) {
mylist->insert(mylist->begin(), 0);
}
}
- catch(const bad_alloc &){
+ BOOST_CATCH(const bad_alloc &){
//memory is full
- }
+ } BOOST_CATCH_END
//Let's obtain the new size of the list
MyList::size_type new_size = mylist->size();
return 0;
}
//]
-#include <boost/interprocess/detail/config_end.hpp>
+