File indexing completed on 2025-04-26 08:26:30
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_COBALT_EXPERIMENTAL_FRAME_HPP
0009 #define BOOST_COBALT_EXPERIMENTAL_FRAME_HPP
0010
0011 #include <type_traits>
0012 #include <utility>
0013
0014 namespace boost::cobalt::experimental
0015 {
0016
0017 template<typename Impl, typename Promise>
0018 struct frame
0019 {
0020 void (*resume_) (frame *) = +[](frame * ff) { static_cast<Impl*>(ff)->resume();};
0021 void (*destroy_)(frame *) = +[](frame * ff) { static_cast<Impl*>(ff)->destroy();};
0022 typedef Promise promise_type;
0023 Promise promise;
0024
0025 template<typename ... Args>
0026 frame(Args && ... args) : promise(std::forward<Args>(args)...)
0027 {
0028 }
0029
0030 };
0031
0032
0033 }
0034
0035 #endif