$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r82362 - in trunk: boost/intrusive/detail libs/intrusive/example libs/intrusive/test
From: igaztanaga_at_[hidden]
Date: 2013-01-05 11:39:31
Author: igaztanaga
Date: 2013-01-05 11:39:30 EST (Sat, 05 Jan 2013)
New Revision: 82362
URL: http://svn.boost.org/trac/boost/changeset/82362
Log:
Fixes #7849
Text files modified: 
   trunk/boost/intrusive/detail/utilities.hpp                 |     8 +++++---                                
   trunk/libs/intrusive/example/Jamfile.v2                    |     2 +-                                      
   trunk/libs/intrusive/example/doc_erasing_and_disposing.cpp |    28 ++++++++++++++++++++++++++++            
   trunk/libs/intrusive/example/doc_offset_ptr.cpp            |    15 +++++++++++++++                         
   trunk/libs/intrusive/test/Jamfile.v2                       |     9 ++-------                               
   5 files changed, 51 insertions(+), 11 deletions(-)
Modified: trunk/boost/intrusive/detail/utilities.hpp
==============================================================================
--- trunk/boost/intrusive/detail/utilities.hpp	(original)
+++ trunk/boost/intrusive/detail/utilities.hpp	2013-01-05 11:39:30 EST (Sat, 05 Jan 2013)
@@ -28,6 +28,7 @@
 #include <iterator>
 #include <boost/cstdint.hpp>
 #include <boost/static_assert.hpp>
+#include <boost/detail/no_exceptions_support.hpp>
 
 namespace boost {
 namespace intrusive {
@@ -692,19 +693,20 @@
    {
       char *init_buf = (char*)rawbuf;
       std::size_t i = 0;
-      try{
+      BOOST_TRY{
          for(; i != N; ++i){
             new(init_buf)T(init);
             init_buf += sizeof(T);
          }
       }
-      catch(...){
+      BOOST_CATCH(...){
          while(i--){
             init_buf -= sizeof(T);
             ((T*)init_buf)->~T();
          }
-         throw;
+         BOOST_RETHROW;
       }
+      BOOST_CATCH_END
    }
 
    operator T* ()
Modified: trunk/libs/intrusive/example/Jamfile.v2
==============================================================================
--- trunk/libs/intrusive/example/Jamfile.v2	(original)
+++ trunk/libs/intrusive/example/Jamfile.v2	2013-01-05 11:39:30 EST (Sat, 05 Jan 2013)
@@ -21,7 +21,7 @@
 
    for local fileb in [ glob *.cpp ]
    {
-      all_rules += [ run $(fileb) /boost/thread//boost_thread
+      all_rules += [ run $(fileb)
       :  # additional args
       :  # test-files
       :  # requirements
Modified: trunk/libs/intrusive/example/doc_erasing_and_disposing.cpp
==============================================================================
--- trunk/libs/intrusive/example/doc_erasing_and_disposing.cpp	(original)
+++ trunk/libs/intrusive/example/doc_erasing_and_disposing.cpp	2013-01-05 11:39:30 EST (Sat, 05 Jan 2013)
@@ -9,6 +9,7 @@
 // See http://www.boost.org/libs/intrusive for documentation.
 //
 /////////////////////////////////////////////////////////////////////////////
+#include <boost/detail/no_exceptions_support.hpp>
 //[doc_erasing_and_disposing
 #include <boost/intrusive/list.hpp>
 
@@ -50,18 +51,45 @@
    //Fill all the nodes and insert them in the list
    my_class_list list;
 
+   //<-
+   #if 1
+   BOOST_TRY{
+   #else
+   //->
    try{
+   //<-
+   #endif
+   //->
       //Insert new objects in the container
       for(int i = 0; i < MaxElem; ++i) list.push_back(*new my_class(i));
 
       //Now use remove_and_dispose_if to erase and delete the objects
       list.remove_and_dispose_if(is_even(), delete_disposer());
    }
+   //<-
+   #if 1
+   BOOST_CATCH(...){
+   #else
+   //->
    catch(...){
+   //<-
+   #endif
+   //->
       //If something throws, make sure that all the memory is freed
       list.clear_and_dispose(delete_disposer());
+      //<-
+      #if 1
+      BOOST_RETHROW
+      #else
+      //->
       throw;
+      //<-
+      #endif
+      //->
    }
+   //<-
+   BOOST_CATCH_END
+   //->
 
    //Dispose remaining elements
    list.erase_and_dispose(list.begin(), list.end(), delete_disposer());
Modified: trunk/libs/intrusive/example/doc_offset_ptr.cpp
==============================================================================
--- trunk/libs/intrusive/example/doc_offset_ptr.cpp	(original)
+++ trunk/libs/intrusive/example/doc_offset_ptr.cpp	2013-01-05 11:39:30 EST (Sat, 05 Jan 2013)
@@ -10,6 +10,18 @@
 //
 /////////////////////////////////////////////////////////////////////////////
 
+#include <boost/config.hpp>
+
+#ifdef BOOST_NO_EXCEPTIONS
+
+//Interprocess does not support BOOST_NO_EXCEPTIONS so nothing to test here
+int main()
+{
+   return 0;
+}
+
+#else //!BOOST_NO_EXCEPTIONS
+
 //This is needed to allow concurrent test execution in
 //several platforms. The shared memory must be unique
 //for each process...
@@ -100,3 +112,6 @@
    return 0;
 }
 //]
+
+#endif //BOOST_NO_EXCEPTIONS
+
Modified: trunk/libs/intrusive/test/Jamfile.v2
==============================================================================
--- trunk/libs/intrusive/test/Jamfile.v2	(original)
+++ trunk/libs/intrusive/test/Jamfile.v2	2013-01-05 11:39:30 EST (Sat, 05 Jan 2013)
@@ -20,19 +20,14 @@
 
    for local fileb in [ glob *.cpp ]
    {
-      all_rules += [ run $(fileb) /boost/thread//boost_thread
+      all_rules += [ run $(fileb)
       :  # additional args
       :  # test-files
       :  # requirements
-        <toolset>acc:<linkflags>-lrt
-        <toolset>acc-pa_risc:<linkflags>-lrt
-        <toolset>gcc-mingw:<linkflags>"-lole32 -loleaut32"
-        <host-os>hpux,<toolset>gcc:<linkflags>"-Wl,+as,mpas"
-        <host-os>windows,<toolset>clang:<linkflags>"-lole32 -loleaut32 -lpsapi -ladvapi32"
       ] ;
    }
 
    return $(all_rules) ;
 }
 
-test-suite intrusive_test : [ test_all r ] : <threading>multi ;
\ No newline at end of file
+test-suite intrusive_test : [ test_all r ] : ;
\ No newline at end of file