Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:44:26

0001 // Copyright (c) 2022 Klemens D. Morgenstern
0002 //
0003 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0004 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0005 #ifndef BOOST_COBALT_MAIN_HPP
0006 #define BOOST_COBALT_MAIN_HPP
0007 
0008 #include <boost/cobalt/concepts.hpp>
0009 #include <boost/cobalt/this_coro.hpp>
0010 
0011 #include <boost/asio/io_context.hpp>
0012 
0013 
0014 
0015 #include <coroutine>
0016 #include <optional>
0017 
0018 namespace boost::cobalt
0019 {
0020 
0021 namespace detail { struct main_promise; }
0022 class main;
0023 
0024 }
0025 
0026 auto co_main(int argc, char * argv[]) -> boost::cobalt::main;
0027 
0028 namespace boost::cobalt
0029 {
0030 
0031 class main
0032 {
0033   detail::main_promise * promise;
0034   main(detail::main_promise * promise) : promise(promise) {}
0035   friend auto ::co_main(int argc, char * argv[]) -> boost::cobalt::main;
0036   friend struct detail::main_promise;
0037 };
0038 
0039 }
0040 
0041 
0042 
0043 #include <boost/cobalt/detail/main.hpp>
0044 
0045 #endif //BOOST_COBALT_MAIN_HPP