summaryrefslogtreecommitdiff
path: root/boost/coroutine2/detail
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:22:41 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:22:41 +0900
commit3c1df2168531ad5580076ae08d529054689aeedd (patch)
tree941aff6f86393eecacddfec252a8508c7e8351c9 /boost/coroutine2/detail
parentd6a306e745acfee00e81ccaf3324a2a03516db41 (diff)
downloadboost-3c1df2168531ad5580076ae08d529054689aeedd.tar.gz
boost-3c1df2168531ad5580076ae08d529054689aeedd.tar.bz2
boost-3c1df2168531ad5580076ae08d529054689aeedd.zip
Imported Upstream version 1.70.0upstream/1.70.0
Diffstat (limited to 'boost/coroutine2/detail')
-rw-r--r--boost/coroutine2/detail/pull_control_block_cc.ipp25
-rw-r--r--boost/coroutine2/detail/pull_coroutine.hpp31
-rw-r--r--boost/coroutine2/detail/push_control_block_cc.ipp25
3 files changed, 56 insertions, 25 deletions
diff --git a/boost/coroutine2/detail/pull_control_block_cc.ipp b/boost/coroutine2/detail/pull_control_block_cc.ipp
index c156b632a6..fa7a38513b 100644
--- a/boost/coroutine2/detail/pull_control_block_cc.ipp
+++ b/boost/coroutine2/detail/pull_control_block_cc.ipp
@@ -14,6 +14,7 @@
#include <boost/assert.hpp>
#include <boost/config.hpp>
+#include <boost/context/detail/config.hpp>
#include <boost/context/fiber.hpp>
@@ -59,6 +60,10 @@ pull_coroutine< T >::control_block::control_block( context::preallocated palloc,
fn( synthesized);
} catch ( boost::context::detail::forced_unwind const&) {
throw;
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+ } catch ( abi::__forced_unwind const&) {
+ throw;
+#endif
} catch (...) {
// store other exceptions in exception-pointer
except = std::current_exception();
@@ -84,6 +89,10 @@ pull_coroutine< T >::control_block::control_block( context::preallocated palloc,
fn( synthesized);
} catch ( boost::context::detail::forced_unwind const&) {
throw;
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+ } catch ( abi::__forced_unwind const&) {
+ throw;
+#endif
} catch (...) {
// store other exceptions in exception-pointer
except = std::current_exception();
@@ -207,6 +216,10 @@ pull_coroutine< T & >::control_block::control_block( context::preallocated pallo
fn( synthesized);
} catch ( boost::context::detail::forced_unwind const&) {
throw;
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+ } catch ( abi::__forced_unwind const&) {
+ throw;
+#endif
} catch (...) {
// store other exceptions in exception-pointer
except = std::current_exception();
@@ -232,6 +245,10 @@ pull_coroutine< T & >::control_block::control_block( context::preallocated pallo
fn( synthesized);
} catch ( boost::context::detail::forced_unwind const&) {
throw;
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+ } catch ( abi::__forced_unwind const&) {
+ throw;
+#endif
} catch (...) {
// store other exceptions in exception-pointer
except = std::current_exception();
@@ -331,6 +348,10 @@ pull_coroutine< void >::control_block::control_block( context::preallocated pall
fn( synthesized);
} catch ( boost::context::detail::forced_unwind const&) {
throw;
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+ } catch ( abi::__forced_unwind const&) {
+ throw;
+#endif
} catch (...) {
// store other exceptions in exception-pointer
except = std::current_exception();
@@ -356,6 +377,10 @@ pull_coroutine< void >::control_block::control_block( context::preallocated pall
fn( synthesized);
} catch ( boost::context::detail::forced_unwind const&) {
throw;
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+ } catch ( abi::__forced_unwind const&) {
+ throw;
+#endif
} catch (...) {
// store other exceptions in exception-pointer
except = std::current_exception();
diff --git a/boost/coroutine2/detail/pull_coroutine.hpp b/boost/coroutine2/detail/pull_coroutine.hpp
index c8ea49f367..0bb8ea99ed 100644
--- a/boost/coroutine2/detail/pull_coroutine.hpp
+++ b/boost/coroutine2/detail/pull_coroutine.hpp
@@ -55,7 +55,6 @@ public:
pull_coroutine( pull_coroutine &&) noexcept;
pull_coroutine & operator=( pull_coroutine && other) noexcept {
- if ( this == & other) return * this;
std::swap( cb_, other.cb_);
return * this;
}
@@ -104,16 +103,6 @@ public:
fetch_();
}
- iterator( iterator const& other) noexcept :
- c_{ other.c_ } {
- }
-
- iterator & operator=( iterator const& other) noexcept {
- if ( this == & other) return * this;
- c_ = other.c_;
- return * this;
- }
-
bool operator==( iterator const& other) const noexcept {
return other.c_ == c_;
}
@@ -127,7 +116,9 @@ public:
return * this;
}
- iterator operator++( int) = delete;
+ void operator++( int) {
+ increment_();
+ }
reference_t operator*() const noexcept {
return c_->cb_->get();
@@ -172,7 +163,6 @@ public:
pull_coroutine( pull_coroutine &&) noexcept;
pull_coroutine & operator=( pull_coroutine && other) noexcept {
- if ( this == & other) return * this;
std::swap( cb_, other.cb_);
return * this;
}
@@ -221,16 +211,6 @@ public:
fetch_();
}
- iterator( iterator const& other) noexcept :
- c_{ other.c_ } {
- }
-
- iterator & operator=( iterator const& other) noexcept {
- if ( this == & other) return * this;
- c_ = other.c_;
- return * this;
- }
-
bool operator==( iterator const& other) const noexcept {
return other.c_ == c_;
}
@@ -244,7 +224,9 @@ public:
return * this;
}
- iterator operator++( int) = delete;
+ void operator++( int) {
+ increment_();
+ }
reference_t operator*() const noexcept {
return c_->cb_->get();
@@ -287,7 +269,6 @@ public:
pull_coroutine( pull_coroutine &&) noexcept;
pull_coroutine & operator=( pull_coroutine && other) noexcept {
- if ( this == & other) return * this;
std::swap( cb_, other.cb_);
return * this;
}
diff --git a/boost/coroutine2/detail/push_control_block_cc.ipp b/boost/coroutine2/detail/push_control_block_cc.ipp
index a7c0be341f..fc58f68d42 100644
--- a/boost/coroutine2/detail/push_control_block_cc.ipp
+++ b/boost/coroutine2/detail/push_control_block_cc.ipp
@@ -13,6 +13,7 @@
#include <boost/assert.hpp>
#include <boost/config.hpp>
+#include <boost/context/detail/config.hpp>
#include <boost/context/fiber.hpp>
@@ -59,6 +60,10 @@ push_coroutine< T >::control_block::control_block( context::preallocated palloc,
fn( synthesized);
} catch ( boost::context::detail::forced_unwind const&) {
throw;
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+ } catch ( abi::__forced_unwind const&) {
+ throw;
+#endif
} catch (...) {
// store other exceptions in exception-pointer
except = std::current_exception();
@@ -86,6 +91,10 @@ push_coroutine< T >::control_block::control_block( context::preallocated palloc,
fn( synthesized);
} catch ( boost::context::detail::forced_unwind const&) {
throw;
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+ } catch ( abi::__forced_unwind const&) {
+ throw;
+#endif
} catch (...) {
// store other exceptions in exception-pointer
except = std::current_exception();
@@ -182,6 +191,10 @@ push_coroutine< T & >::control_block::control_block( context::preallocated pallo
fn( synthesized);
} catch ( boost::context::detail::forced_unwind const&) {
throw;
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+ } catch ( abi::__forced_unwind const&) {
+ throw;
+#endif
} catch (...) {
// store other exceptions in exception-pointer
except = std::current_exception();
@@ -209,6 +222,10 @@ push_coroutine< T & >::control_block::control_block( context::preallocated pallo
fn( synthesized);
} catch ( boost::context::detail::forced_unwind const&) {
throw;
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+ } catch ( abi::__forced_unwind const&) {
+ throw;
+#endif
} catch (...) {
// store other exceptions in exception-pointer
except = std::current_exception();
@@ -292,6 +309,10 @@ push_coroutine< void >::control_block::control_block( context::preallocated pall
fn( synthesized);
} catch ( boost::context::detail::forced_unwind const&) {
throw;
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+ } catch ( abi::__forced_unwind const&) {
+ throw;
+#endif
} catch (...) {
// store other exceptions in exception-pointer
except = std::current_exception();
@@ -319,6 +340,10 @@ push_coroutine< void >::control_block::control_block( context::preallocated pall
fn( synthesized);
} catch ( boost::context::detail::forced_unwind const&) {
throw;
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+ } catch ( abi::__forced_unwind const&) {
+ throw;
+#endif
} catch (...) {
// store other exceptions in exception-pointer
except = std::current_exception();