Skip to content

Commit 8f7f52e

Browse files
committed
Remove ::experimental from coroutine namespace
1 parent a87e97f commit 8f7f52e

41 files changed

Lines changed: 177 additions & 177 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -714,15 +714,15 @@ namespace cppcoro
714714
{
715715
public:
716716
bool await_ready() const noexcept;
717-
bool await_suspend(std::experimental::coroutine_handle<> awaiter) noexcept;
717+
bool await_suspend(std::coroutine_handle<> awaiter) noexcept;
718718
void await_resume() const noexcept;
719719
};
720720

721721
class async_mutex_scoped_lock_operation
722722
{
723723
public:
724724
bool await_ready() const noexcept;
725-
bool await_suspend(std::experimental::coroutine_handle<> awaiter) noexcept;
725+
bool await_suspend(std::coroutine_handle<> awaiter) noexcept;
726726
[[nodiscard]] async_mutex_lock await_resume() const noexcept;
727727
};
728728

@@ -836,7 +836,7 @@ namespace cppcoro
836836
async_manual_reset_event_operation(async_manual_reset_event& event) noexcept;
837837

838838
bool await_ready() const noexcept;
839-
bool await_suspend(std::experimental::coroutine_handle<> awaiter) noexcept;
839+
bool await_suspend(std::coroutine_handle<> awaiter) noexcept;
840840
void await_resume() const noexcept;
841841
};
842842
}
@@ -904,7 +904,7 @@ namespace cppcoro
904904
async_auto_reset_event_operation(const async_auto_reset_event_operation& other) noexcept;
905905
906906
bool await_ready() const noexcept;
907-
bool await_suspend(std::experimental::coroutine_handle<> awaiter) noexcept;
907+
bool await_suspend(std::coroutine_handle<> awaiter) noexcept;
908908
void await_resume() const noexcept;
909909
910910
};
@@ -1389,7 +1389,7 @@ namespace cppcoro
13891389
schedule_operation(static_thread_pool* tp) noexcept;
13901390
13911391
bool await_ready() noexcept;
1392-
bool await_suspend(std::experimental::coroutine_handle<> h) noexcept;
1392+
bool await_suspend(std::coroutine_handle<> h) noexcept;
13931393
bool await_resume() noexcept;
13941394
13951395
private:
@@ -1546,7 +1546,7 @@ namespace cppcoro
15461546
schedule_operation& operator=(const schedule_operation&) noexcept;
15471547

15481548
bool await_ready() const noexcept;
1549-
void await_suspend(std::experimental::coroutine_handle<> awaiter) noexcept;
1549+
void await_suspend(std::coroutine_handle<> awaiter) noexcept;
15501550
void await_resume() noexcept;
15511551
};
15521552

@@ -1560,7 +1560,7 @@ namespace cppcoro
15601560
timed_schedule_operation& operator=(timed_schedule_operation&&) = delete;
15611561

15621562
bool await_ready() const noexcept;
1563-
void await_suspend(std::experimental::coroutine_handle<> awaiter);
1563+
void await_suspend(std::coroutine_handle<> awaiter);
15641564
void await_resume();
15651565
};
15661566

@@ -1596,7 +1596,7 @@ Example:
15961596
#include <algorithm>
15971597
#include <iostream>
15981598
1599-
namespace fs = std::experimental::filesystem;
1599+
namespace fs = std::filesystem;
16001600
16011601
cppcoro::task<std::uint64_t> count_lines(cppcoro::io_service& ioService, fs::path path)
16021602
{
@@ -1740,7 +1740,7 @@ namespace cppcoro
17401740
file_read_operation(file_read_operation&& other) noexcept;
17411741
17421742
bool await_ready() const noexcept;
1743-
bool await_suspend(std::experimental::coroutine_handle<> awaiter);
1743+
bool await_suspend(std::coroutine_handle<> awaiter);
17441744
std::size_t await_resume();
17451745
17461746
};
@@ -1752,7 +1752,7 @@ namespace cppcoro
17521752
file_write_operation(file_write_operation&& other) noexcept;
17531753
17541754
bool await_ready() const noexcept;
1755-
bool await_suspend(std::experimental::coroutine_handle<> awaiter);
1755+
bool await_suspend(std::coroutine_handle<> awaiter);
17561756
std::size_t await_resume();
17571757
17581758
};
@@ -1774,7 +1774,7 @@ namespace cppcoro
17741774
[[nodiscard]]
17751775
static read_only_file open(
17761776
io_service& ioService,
1777-
const std::experimental::filesystem::path& path,
1777+
const std::filesystem::path& path,
17781778
file_share_mode shareMode = file_share_mode::read,
17791779
file_buffering_mode bufferingMode = file_buffering_mode::default_);
17801780

@@ -1787,7 +1787,7 @@ namespace cppcoro
17871787
[[nodiscard]]
17881788
static write_only_file open(
17891789
io_service& ioService,
1790-
const std::experimental::filesystem::path& path,
1790+
const std::filesystem::path& path,
17911791
file_open_mode openMode = file_open_mode::create_or_open,
17921792
file_share_mode shareMode = file_share_mode::none,
17931793
file_buffering_mode bufferingMode = file_buffering_mode::default_);
@@ -1801,7 +1801,7 @@ namespace cppcoro
18011801
[[nodiscard]]
18021802
static read_write_file open(
18031803
io_service& ioService,
1804-
const std::experimental::filesystem::path& path,
1804+
const std::filesystem::path& path,
18051805
file_open_mode openMode = file_open_mode::create_or_open,
18061806
file_share_mode shareMode = file_share_mode::none,
18071807
file_buffering_mode bufferingMode = file_buffering_mode::default_);
@@ -2794,7 +2794,7 @@ coroutine.
27942794

27952795
A type that satisfies `Awaiter<T>` must have, for an instance of the type, `awaiter`:
27962796
- `awaiter.await_ready()` -> `bool`
2797-
- `awaiter.await_suspend(std::experimental::coroutine_handle<void>{})` -> `void` or `bool` or `std::experimental::coroutine_handle<P>` for some `P`.
2797+
- `awaiter.await_suspend(std::coroutine_handle<void>{})` -> `void` or `bool` or `std::coroutine_handle<P>` for some `P`.
27982798
- `awaiter.await_resume()` -> `T`
27992799

28002800
Any type that implements the `Awaiter<T>` concept also implements the `Awaitable<T>` concept.

include/cppcoro/async_auto_reset_event.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ namespace cppcoro
8080
async_auto_reset_event_operation(const async_auto_reset_event_operation& other) noexcept;
8181

8282
bool await_ready() const noexcept { return m_event == nullptr; }
83-
bool await_suspend(std::experimental::coroutine_handle<> awaiter) noexcept;
83+
bool await_suspend(std::coroutine_handle<> awaiter) noexcept;
8484
void await_resume() const noexcept {}
8585

8686
private:
@@ -89,7 +89,7 @@ namespace cppcoro
8989

9090
const async_auto_reset_event* m_event;
9191
async_auto_reset_event_operation* m_next;
92-
std::experimental::coroutine_handle<> m_awaiter;
92+
std::coroutine_handle<> m_awaiter;
9393
std::atomic<std::uint32_t> m_refCount;
9494

9595
};

include/cppcoro/async_generator.hpp

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
std::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+
std::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(std::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+
std::coroutine_handle<>
113+
await_suspend([[maybe_unused]] std::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+
std::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+
std::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+
std::coroutine_handle<>
159+
await_suspend(std::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+
std::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 = std::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 = std::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(std::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+
std::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+
std::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+
std::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(std::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+
std::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+
std::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(std::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+
std::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 = std::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 = std::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(std::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+
std::coroutine_handle<promise_type> m_coroutine;
10451045

10461046
};
10471047

include/cppcoro/async_manual_reset_event.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ namespace cppcoro
8787
explicit async_manual_reset_event_operation(const async_manual_reset_event& event) noexcept;
8888

8989
bool await_ready() const noexcept;
90-
bool await_suspend(std::experimental::coroutine_handle<> awaiter) noexcept;
90+
bool await_suspend(std::coroutine_handle<> awaiter) noexcept;
9191
void await_resume() const noexcept {}
9292

9393
private:
@@ -96,7 +96,7 @@ namespace cppcoro
9696

9797
const async_manual_reset_event& m_event;
9898
async_manual_reset_event_operation* m_next;
99-
std::experimental::coroutine_handle<> m_awaiter;
99+
std::coroutine_handle<> m_awaiter;
100100

101101
};
102102
}

include/cppcoro/async_mutex.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ namespace cppcoro
166166
{}
167167

168168
bool await_ready() const noexcept { return false; }
169-
bool await_suspend(std::experimental::coroutine_handle<> awaiter) noexcept;
169+
bool await_suspend(std::coroutine_handle<> awaiter) noexcept;
170170
void await_resume() const noexcept {}
171171

172172
protected:
@@ -178,7 +178,7 @@ namespace cppcoro
178178
private:
179179

180180
async_mutex_lock_operation* m_next;
181-
std::experimental::coroutine_handle<> m_awaiter;
181+
std::coroutine_handle<> m_awaiter;
182182

183183
};
184184

0 commit comments

Comments
 (0)