Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 10:03:04

0001 #ifndef BOOST_THREAD_EXPERIMENTAL_PARALLEL_V1_EXCEPTION_LIST_HPP
0002 #define BOOST_THREAD_EXPERIMENTAL_PARALLEL_V1_EXCEPTION_LIST_HPP
0003 
0004 //////////////////////////////////////////////////////////////////////////////
0005 //
0006 // (C) Copyright Vicente J. Botet Escriba 2014. Distributed under the Boost
0007 // Software License, Version 1.0. (See accompanying file
0008 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0009 //
0010 // See http://www.boost.org/libs/thread for documentation.
0011 //
0012 //////////////////////////////////////////////////////////////////////////////
0013 
0014 #include <boost/thread/detail/config.hpp>
0015 #include <boost/thread/experimental/parallel/v1/inline_namespace.hpp>
0016 
0017 #include <boost/exception_ptr.hpp>
0018 #include <exception>
0019 #include <list>
0020 
0021 #include <boost/config/abi_prefix.hpp>
0022 
0023 namespace boost
0024 {
0025 namespace experimental
0026 {
0027 namespace parallel
0028 {
0029 BOOST_THREAD_INLINE_NAMESPACE(v1)
0030 {
0031 
0032   class BOOST_SYMBOL_VISIBLE exception_list: public std::exception
0033   {
0034     typedef std::list<exception_ptr> exception_ptr_list;
0035     exception_ptr_list list_;
0036   public:
0037     typedef exception_ptr_list::const_iterator const_iterator;
0038 
0039     ~exception_list() BOOST_NOEXCEPT_OR_NOTHROW {}
0040 
0041     void add(exception_ptr const& e)
0042     {
0043       list_.push_back(e);
0044     }
0045     size_t size() const BOOST_NOEXCEPT
0046     {
0047       return list_.size();
0048     }
0049     const_iterator begin() const BOOST_NOEXCEPT
0050     {
0051       return list_.begin();
0052     }
0053     const_iterator end() const BOOST_NOEXCEPT
0054     {
0055       return list_.end();
0056     }
0057     const char* what() const BOOST_NOEXCEPT_OR_NOTHROW
0058     {
0059       return "exception_list";
0060     }
0061 
0062   };
0063 }
0064 
0065 } // parallel
0066 } // experimental
0067 } // boost
0068 #include <boost/config/abi_suffix.hpp>
0069 
0070 #endif