1212#include < atomic>
1313#include < iterator>
1414#include < type_traits>
15- #include < experimental /coroutine>
15+ #include < cppcoro /coroutine.hpp >
1616#include < functional>
1717#include < cassert>
1818
@@ -45,7 +45,7 @@ namespace cppcoro
4545 async_generator_promise_base (const async_generator_promise_base& other) = delete ;
4646 async_generator_promise_base& operator =(const async_generator_promise_base& other) = delete ;
4747
48- std::experimental ::suspend_always initial_suspend () const noexcept
48+ cppcoro ::suspend_always initial_suspend () const noexcept
4949 {
5050 return {};
5151 }
@@ -89,7 +89,7 @@ namespace cppcoro
8989
9090 std::exception_ptr m_exception;
9191
92- std::experimental ::coroutine_handle<> m_consumerCoroutine;
92+ cppcoro ::coroutine_handle<> m_consumerCoroutine;
9393
9494 protected:
9595
@@ -100,7 +100,7 @@ namespace cppcoro
100100 {
101101 public:
102102
103- async_generator_yield_operation (std::experimental ::coroutine_handle<> consumer) noexcept
103+ async_generator_yield_operation (cppcoro ::coroutine_handle<> consumer) noexcept
104104 : m_consumer(consumer)
105105 {}
106106
@@ -109,8 +109,8 @@ namespace cppcoro
109109 return false ;
110110 }
111111
112- std::experimental ::coroutine_handle<>
113- await_suspend ([[maybe_unused]] std::experimental ::coroutine_handle<> producer) noexcept
112+ cppcoro ::coroutine_handle<>
113+ await_suspend ([[maybe_unused]] cppcoro ::coroutine_handle<> producer) noexcept
114114 {
115115 return m_consumer;
116116 }
@@ -119,7 +119,7 @@ namespace cppcoro
119119
120120 private:
121121
122- std::experimental ::coroutine_handle<> m_consumer;
122+ cppcoro ::coroutine_handle<> m_consumer;
123123
124124 };
125125
@@ -145,7 +145,7 @@ namespace cppcoro
145145
146146 async_generator_advance_operation (
147147 async_generator_promise_base& promise,
148- std::experimental ::coroutine_handle<> producerCoroutine) noexcept
148+ cppcoro ::coroutine_handle<> producerCoroutine) noexcept
149149 : m_promise(std::addressof(promise))
150150 , m_producerCoroutine(producerCoroutine)
151151 {
@@ -155,8 +155,8 @@ namespace cppcoro
155155
156156 bool await_ready () const noexcept { return false ; }
157157
158- std::experimental ::coroutine_handle<>
159- await_suspend (std::experimental ::coroutine_handle<> consumerCoroutine) noexcept
158+ cppcoro ::coroutine_handle<>
159+ await_suspend (cppcoro ::coroutine_handle<> consumerCoroutine) noexcept
160160 {
161161 m_promise->m_consumerCoroutine = consumerCoroutine;
162162 return m_producerCoroutine;
@@ -165,7 +165,7 @@ namespace cppcoro
165165 protected:
166166
167167 async_generator_promise_base* m_promise;
168- std::experimental ::coroutine_handle<> m_producerCoroutine;
168+ cppcoro ::coroutine_handle<> m_producerCoroutine;
169169
170170 };
171171
@@ -242,7 +242,7 @@ namespace cppcoro
242242 class async_generator_iterator final
243243 {
244244 using promise_type = async_generator_promise<T>;
245- using handle_type = std::experimental ::coroutine_handle<promise_type>;
245+ using handle_type = cppcoro ::coroutine_handle<promise_type>;
246246
247247 public:
248248
@@ -307,7 +307,7 @@ namespace cppcoro
307307 class async_generator_begin_operation final : public async_generator_advance_operation
308308 {
309309 using promise_type = async_generator_promise<T>;
310- using handle_type = std::experimental ::coroutine_handle<promise_type>;
310+ using handle_type = cppcoro ::coroutine_handle<promise_type>;
311311
312312 public:
313313
@@ -358,7 +358,7 @@ namespace cppcoro
358358 {}
359359
360360 explicit async_generator (promise_type& promise) noexcept
361- : m_coroutine (std::experimental ::coroutine_handle<promise_type>::from_promise (promise))
361+ : m_coroutine (cppcoro ::coroutine_handle<promise_type>::from_promise (promise))
362362 {}
363363
364364 async_generator (async_generator&& other) noexcept
@@ -408,7 +408,7 @@ namespace cppcoro
408408
409409 private:
410410
411- std::experimental ::coroutine_handle<promise_type> m_coroutine;
411+ cppcoro ::coroutine_handle<promise_type> m_coroutine;
412412
413413 };
414414
@@ -451,7 +451,7 @@ namespace cppcoro
451451 async_generator_promise_base (const async_generator_promise_base& other) = delete ;
452452 async_generator_promise_base& operator =(const async_generator_promise_base& other) = delete ;
453453
454- std::experimental ::suspend_always initial_suspend () const noexcept
454+ cppcoro ::suspend_always initial_suspend () const noexcept
455455 {
456456 return {};
457457 }
@@ -556,7 +556,7 @@ namespace cppcoro
556556
557557 std::exception_ptr m_exception;
558558
559- std::experimental ::coroutine_handle<> m_consumerCoroutine;
559+ cppcoro ::coroutine_handle<> m_consumerCoroutine;
560560
561561 protected:
562562
@@ -579,7 +579,7 @@ namespace cppcoro
579579 return m_initialState == state::value_not_ready_consumer_suspended;
580580 }
581581
582- bool await_suspend (std::experimental ::coroutine_handle<> producer) noexcept ;
582+ bool await_suspend (cppcoro ::coroutine_handle<> producer) noexcept ;
583583
584584 void await_resume () noexcept {}
585585
@@ -625,7 +625,7 @@ namespace cppcoro
625625 }
626626
627627 inline bool async_generator_yield_operation::await_suspend (
628- std::experimental ::coroutine_handle<> producer) noexcept
628+ cppcoro ::coroutine_handle<> producer) noexcept
629629 {
630630 state currentState = m_initialState;
631631 if (currentState == state::value_not_ready_consumer_active)
@@ -711,7 +711,7 @@ namespace cppcoro
711711
712712 async_generator_advance_operation (
713713 async_generator_promise_base& promise,
714- std::experimental ::coroutine_handle<> producerCoroutine) noexcept
714+ cppcoro ::coroutine_handle<> producerCoroutine) noexcept
715715 : m_promise(std::addressof(promise))
716716 , m_producerCoroutine(producerCoroutine)
717717 {
@@ -740,7 +740,7 @@ namespace cppcoro
740740 return m_initialState == state::value_ready_producer_suspended;
741741 }
742742
743- bool await_suspend (std::experimental ::coroutine_handle<> consumerCoroutine) noexcept
743+ bool await_suspend (cppcoro ::coroutine_handle<> consumerCoroutine) noexcept
744744 {
745745 m_promise->m_consumerCoroutine = consumerCoroutine;
746746
@@ -791,7 +791,7 @@ namespace cppcoro
791791 protected:
792792
793793 async_generator_promise_base* m_promise;
794- std::experimental ::coroutine_handle<> m_producerCoroutine;
794+ cppcoro ::coroutine_handle<> m_producerCoroutine;
795795
796796 private:
797797
@@ -872,7 +872,7 @@ namespace cppcoro
872872 class async_generator_iterator final
873873 {
874874 using promise_type = async_generator_promise<T>;
875- using handle_type = std::experimental ::coroutine_handle<promise_type>;
875+ using handle_type = cppcoro ::coroutine_handle<promise_type>;
876876
877877 public:
878878
@@ -937,7 +937,7 @@ namespace cppcoro
937937 class async_generator_begin_operation final : public async_generator_advance_operation
938938 {
939939 using promise_type = async_generator_promise<T>;
940- using handle_type = std::experimental ::coroutine_handle<promise_type>;
940+ using handle_type = cppcoro ::coroutine_handle<promise_type>;
941941
942942 public:
943943
@@ -988,7 +988,7 @@ namespace cppcoro
988988 {}
989989
990990 explicit async_generator (promise_type& promise) noexcept
991- : m_coroutine(std::experimental ::coroutine_handle<promise_type>::from_promise(promise))
991+ : m_coroutine(cppcoro ::coroutine_handle<promise_type>::from_promise(promise))
992992 {}
993993
994994 async_generator (async_generator&& other) noexcept
@@ -1041,7 +1041,7 @@ namespace cppcoro
10411041
10421042 private:
10431043
1044- std::experimental ::coroutine_handle<promise_type> m_coroutine;
1044+ cppcoro ::coroutine_handle<promise_type> m_coroutine;
10451045
10461046 };
10471047
0 commit comments