]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/fiber/fiber.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / fiber / fiber.hpp
index 2e77d69274a02add450ade06c18ce98d9eaf47fb..709f634a4386baf8048410da5d093b56012b1b99 100644 (file)
@@ -105,7 +105,69 @@ public:
 #else
     fiber( launch policy, std::allocator_arg_t, StackAllocator && salloc, Fn && fn, Arg ... arg) :
 #endif
-        impl_{ make_worker_context( policy, std::forward< StackAllocator >( salloc), std::forward< Fn >( fn), std::forward< Arg >( arg) ... ) } {
+        fiber{ policy,
+               static_cast<fiber_properties*>(nullptr),
+               std::allocator_arg, std::forward< StackAllocator >( salloc),
+               std::forward< Fn >( fn), std::forward< Arg >( arg) ... } {
+    }
+
+    template< typename Fn,
+              typename ... Arg,
+              typename = detail::disable_overload< fiber, Fn >,
+              typename = detail::disable_overload< launch, Fn >,
+              typename = detail::disable_overload< std::allocator_arg_t, Fn >
+    >
+#if BOOST_COMP_GNUC < 50000000
+    explicit fiber( fiber_properties* properties, Fn && fn, Arg && ... arg) :
+#else
+    fiber( fiber_properties* properties, Fn && fn, Arg ... arg) :
+#endif
+        fiber{ launch::post,
+               properties,
+               std::allocator_arg, default_stack(),
+               std::forward< Fn >( fn), std::forward< Arg >( arg) ... } {
+    }
+
+    template< typename Fn,
+              typename ... Arg,
+              typename = detail::disable_overload< fiber, Fn >
+    >
+#if BOOST_COMP_GNUC < 50000000
+    fiber( launch policy, fiber_properties* properties, Fn && fn, Arg && ... arg) :
+#else
+    fiber( launch policy, fiber_properties* properties, Fn && fn, Arg ... arg) :
+#endif
+        fiber{ policy,
+               properties,
+               std::allocator_arg, default_stack(),
+               std::forward< Fn >( fn), std::forward< Arg >( arg) ... } {
+    }
+
+    template< typename StackAllocator,
+              typename Fn,
+              typename ... Arg
+    >
+#if BOOST_COMP_GNUC < 50000000
+    fiber( fiber_properties* properties, std::allocator_arg_t, StackAllocator && salloc, Fn && fn, Arg && ... arg) :
+#else
+    fiber( fiber_properties* properties, std::allocator_arg_t, StackAllocator && salloc, Fn && fn, Arg ... arg) :
+#endif
+        fiber{ launch::post,
+               properties,
+               std::allocator_arg, std::forward< StackAllocator >( salloc),
+               std::forward< Fn >( fn), std::forward< Arg >( arg) ... } {
+    }
+
+    template< typename StackAllocator,
+              typename Fn,
+              typename ... Arg
+    >
+#if BOOST_COMP_GNUC < 50000000
+    fiber( launch policy, fiber_properties* properties, std::allocator_arg_t, StackAllocator && salloc, Fn && fn, Arg && ... arg) :
+#else
+    fiber( launch policy, fiber_properties* properties, std::allocator_arg_t, StackAllocator && salloc, Fn && fn, Arg ... arg) :
+#endif
+        impl_{ make_worker_context_with_properties( policy, properties, std::forward< StackAllocator >( salloc), std::forward< Fn >( fn), std::forward< Arg >( arg) ... ) } {
         start_();
     }