Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 10:09:28

0001 // Distributed under the Boost Software License, Version 1.0. (See
0002 // accompanying file LICENSE_1_0.txt or copy at
0003 // http://www.boost.org/LICENSE_1_0.txt)
0004 // (C) Copyright 2014 Vicente J. Botet Escriba
0005 
0006 #ifndef BOOST_THREAD_EXCEPTIONAL_PTR_HPP
0007 #define BOOST_THREAD_EXCEPTIONAL_PTR_HPP
0008 
0009 #include <boost/thread/detail/move.hpp>
0010 #include <boost/exception_ptr.hpp>
0011 
0012 #include <boost/config/abi_prefix.hpp>
0013 
0014 namespace boost
0015 {
0016   struct exceptional_ptr {
0017     exception_ptr ptr_;
0018 
0019     exceptional_ptr() : ptr_() {}
0020     explicit exceptional_ptr(exception_ptr ex) : ptr_(ex) {}
0021     template <class E>
0022     explicit exceptional_ptr(BOOST_FWD_REF(E) ex) : ptr_(boost::copy_exception(boost::forward<E>(ex))) {}
0023   };
0024 
0025   template <class E>
0026   inline exceptional_ptr make_exceptional(BOOST_FWD_REF(E) ex) {
0027     return exceptional_ptr(boost::forward<E>(ex));
0028   }
0029 
0030   inline exceptional_ptr make_exceptional(exception_ptr ex)
0031   {
0032     return exceptional_ptr(ex);
0033   }
0034 
0035   inline exceptional_ptr make_exceptional()
0036   {
0037     return exceptional_ptr();
0038   }
0039 
0040 } // namespace boost
0041 
0042 #include <boost/config/abi_suffix.hpp>
0043 
0044 #endif