]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/exception/detail/exception_ptr.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / exception / detail / exception_ptr.hpp
index 5830a7f3a220abc1ef42969f76acc8f927ac9c24..53648f8424cea9621eafa9fa0d7e26ec7384849c 100644 (file)
@@ -20,6 +20,7 @@
 #include <boost/core/demangle.hpp>
 #endif
 #include <boost/shared_ptr.hpp>
+#include <boost/make_shared.hpp>
 #include <stdexcept>
 #include <new>
 #include <ios>
@@ -76,20 +77,22 @@ boost
             }
         };
 
+    template <class E>
+    inline
+    exception_ptr
+    copy_exception( E const & e )
+        {
+        E cp = e;
+        exception_detail::copy_boost_exception(&cp, &e);
+        return exception_ptr(boost::make_shared<wrapexcept<E> >(cp));
+        }
+
     template <class T>
     inline
     exception_ptr
-    copy_exception( T const & e )
+    make_exception_ptr( T const & e )
         {
-        try
-            {
-            throw enable_current_exception(e);
-            }
-        catch(
-        ... )
-            {
-            return current_exception();
-            }
+        return copy_exception(e);
         }
 
 #ifndef BOOST_NO_RTTI