diff --git a/ostd/coroutine.hh b/ostd/coroutine.hh index e775732..0b48215 100644 --- a/ostd/coroutine.hh +++ b/ostd/coroutine.hh @@ -567,6 +567,20 @@ inline void swap(generator &a, generator &b) { a.swap(b); } +namespace detail { + template + struct yield_type_base { + using type = typename generator::yield_type; + }; + template + struct yield_type_base { + using type = typename coroutine::yield_type; + }; +} + +template +using yield_type = typename detail::yield_type_base::type; + template struct generator_range: input_range> { using range_category = input_range_tag;