File indexing completed on 2025-12-15 10:09:28
0001
0002
0003
0004
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 }
0041
0042 #include <boost/config/abi_suffix.hpp>
0043
0044 #endif