// Copyright (c) 2023 Klemens D. Morgenstern // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_COBALT_LEAF_HPP #define BOOST_COBALT_LEAF_HPP #include #include #include namespace boost::cobalt { template auto try_catch(TryAwaitable && try_coro, H && ... h ) { return detail::try_catch_awaitable< std::decay_t(try_coro)))>, H...> { detail::get_awaitable_type(std::forward(try_coro)), {std::forward(h)...} }; } template auto try_handle_all(TryAwaitable && try_coro, H && ... h ) { return detail::try_handle_all_awaitable< std::decay_t(try_coro)))>, H...> { detail::get_awaitable_type(std::forward(try_coro)), {std::forward(h)...} }; } template auto try_handle_some(TryAwaitable && try_coro, H && ... h ) { return detail::try_handle_some_awaitable< std::decay_t(try_coro)))>, H...> { detail::get_awaitable_type(std::forward(try_coro)), {std::forward(h)...} }; } } #endif //BOOST_COBALT_LEAF_HPP