]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/interprocess/example/doc_managed_heap_memory.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / interprocess / example / doc_managed_heap_memory.cpp
index da7c677307785004a49f2bb5b70825daaf5edc79..a0c090e46c6bd4ffd1ac21c7b94d5fd7bee18df3 100644 (file)
@@ -7,7 +7,7 @@
 // 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>
@@ -31,14 +31,14 @@ int main ()
    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();
    //<-
@@ -55,14 +55,14 @@ int main ()
                (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();
@@ -78,4 +78,4 @@ int main ()
    return 0;
 }
 //]
-#include <boost/interprocess/detail/config_end.hpp>
+