]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/context/continuation_winfib.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / context / continuation_winfib.hpp
index a92463f326de46b274d5d6dcf0988f0e58b58c44..b75cbec26c26e743524a25a2617872190d08d984 100644 (file)
@@ -185,11 +185,20 @@ struct BOOST_CONTEXT_DECL activation_record_initializer {
 };
 
 struct forced_unwind {
-    activation_record  *   from{ nullptr };
+    activation_record   *   from{ nullptr };
+#ifndef BOOST_ASSERT_IS_VOID
+    bool                    caught{ false };
+#endif
 
     explicit forced_unwind( activation_record * from_) :
         from{ from_ } {
     }
+
+#ifndef BOOST_ASSERT_IS_VOID
+    ~forced_unwind() {
+        BOOST_ASSERT( caught);
+    }
+#endif
 };
 
 template< typename Ctx, typename StackAlloc, typename Fn >
@@ -230,6 +239,9 @@ public:
 #endif  
         } catch ( forced_unwind const& ex) {
             c = Ctx{ ex.from };
+#ifndef BOOST_ASSERT_IS_VOID
+            const_cast< forced_unwind & >( ex).caught = true;
+#endif
         }
         // this context has finished its task
         from = nullptr;
@@ -384,30 +396,10 @@ public:
         return nullptr == ptr_ || ptr_->terminated;
     }
 
-    bool operator==( continuation const& other) const noexcept {
-        return ptr_ == other.ptr_;
-    }
-
-    bool operator!=( continuation const& other) const noexcept {
-        return ptr_ != other.ptr_;
-    }
-
     bool operator<( continuation const& other) const noexcept {
         return ptr_ < other.ptr_;
     }
 
-    bool operator>( continuation const& other) const noexcept {
-        return other.ptr_ < ptr_;
-    }
-
-    bool operator<=( continuation const& other) const noexcept {
-        return ! ( * this > other);
-    }
-
-    bool operator>=( continuation const& other) const noexcept {
-        return ! ( * this < other);
-    }
-
     template< typename charT, class traitsT >
     friend std::basic_ostream< charT, traitsT > &
     operator<<( std::basic_ostream< charT, traitsT > & os, continuation const& other) {