Skip to content

Commit 132ae88

Browse files
committed
Merge remote-tracking branch 'mygithub/unify_experimental_includes' into HEAD
2 parents 8369ff5 + 016b67b commit 132ae88

Some content is hidden

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

47 files changed

+261
-207
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -749,15 +749,15 @@ namespace cppcoro
749749
{
750750
public:
751751
bool await_ready() const noexcept;
752-
bool await_suspend(std::experimental::coroutine_handle<> awaiter) noexcept;
752+
bool await_suspend(cppcoro::coroutine_handle<> awaiter) noexcept;
753753
void await_resume() const noexcept;
754754
};
755755

756756
class async_mutex_scoped_lock_operation
757757
{
758758
public:
759759
bool await_ready() const noexcept;
760-
bool await_suspend(std::experimental::coroutine_handle<> awaiter) noexcept;
760+
bool await_suspend(cppcoro::coroutine_handle<> awaiter) noexcept;
761761
[[nodiscard]] async_mutex_lock await_resume() const noexcept;
762762
};
763763

@@ -871,7 +871,7 @@ namespace cppcoro
871871
async_manual_reset_event_operation(async_manual_reset_event& event) noexcept;
872872

873873
bool await_ready() const noexcept;
874-
bool await_suspend(std::experimental::coroutine_handle<> awaiter) noexcept;
874+
bool await_suspend(cppcoro::coroutine_handle<> awaiter) noexcept;
875875
void await_resume() const noexcept;
876876
};
877877
}
@@ -939,7 +939,7 @@ namespace cppcoro
939939
async_auto_reset_event_operation(const async_auto_reset_event_operation& other) noexcept;
940940
941941
bool await_ready() const noexcept;
942-
bool await_suspend(std::experimental::coroutine_handle<> awaiter) noexcept;
942+
bool await_suspend(cppcoro::coroutine_handle<> awaiter) noexcept;
943943
void await_resume() const noexcept;
944944
945945
};
@@ -1424,7 +1424,7 @@ namespace cppcoro
14241424
schedule_operation(static_thread_pool* tp) noexcept;
14251425
14261426
bool await_ready() noexcept;
1427-
bool await_suspend(std::experimental::coroutine_handle<> h) noexcept;
1427+
bool await_suspend(cppcoro::coroutine_handle<> h) noexcept;
14281428
bool await_resume() noexcept;
14291429
14301430
private:
@@ -1581,7 +1581,7 @@ namespace cppcoro
15811581
schedule_operation& operator=(const schedule_operation&) noexcept;
15821582

15831583
bool await_ready() const noexcept;
1584-
void await_suspend(std::experimental::coroutine_handle<> awaiter) noexcept;
1584+
void await_suspend(cppcoro::coroutine_handle<> awaiter) noexcept;
15851585
void await_resume() noexcept;
15861586
};
15871587

@@ -1595,7 +1595,7 @@ namespace cppcoro
15951595
timed_schedule_operation& operator=(timed_schedule_operation&&) = delete;
15961596

15971597
bool await_ready() const noexcept;
1598-
void await_suspend(std::experimental::coroutine_handle<> awaiter);
1598+
void await_suspend(cppcoro::coroutine_handle<> awaiter);
15991599
void await_resume();
16001600
};
16011601

@@ -1626,12 +1626,12 @@ Example:
16261626
#include <cppcoro/io_service.hpp>
16271627
#include <cppcoro/read_only_file.hpp>
16281628
1629-
#include <experimental/filesystem>
1629+
#include <cppcoro/filesystem.hpp>
16301630
#include <memory>
16311631
#include <algorithm>
16321632
#include <iostream>
16331633
1634-
namespace fs = std::experimental::filesystem;
1634+
namespace fs = cppcoro::filesystem;
16351635
16361636
cppcoro::task<std::uint64_t> count_lines(cppcoro::io_service& ioService, fs::path path)
16371637
{
@@ -1775,7 +1775,7 @@ namespace cppcoro
17751775
file_read_operation(file_read_operation&& other) noexcept;
17761776
17771777
bool await_ready() const noexcept;
1778-
bool await_suspend(std::experimental::coroutine_handle<> awaiter);
1778+
bool await_suspend(cppcoro::coroutine_handle<> awaiter);
17791779
std::size_t await_resume();
17801780
17811781
};
@@ -1787,7 +1787,7 @@ namespace cppcoro
17871787
file_write_operation(file_write_operation&& other) noexcept;
17881788
17891789
bool await_ready() const noexcept;
1790-
bool await_suspend(std::experimental::coroutine_handle<> awaiter);
1790+
bool await_suspend(cppcoro::coroutine_handle<> awaiter);
17911791
std::size_t await_resume();
17921792
17931793
};
@@ -1809,7 +1809,7 @@ namespace cppcoro
18091809
[[nodiscard]]
18101810
static read_only_file open(
18111811
io_service& ioService,
1812-
const std::experimental::filesystem::path& path,
1812+
const cppcoro::filesystem::path& path,
18131813
file_share_mode shareMode = file_share_mode::read,
18141814
file_buffering_mode bufferingMode = file_buffering_mode::default_);
18151815

@@ -1822,7 +1822,7 @@ namespace cppcoro
18221822
[[nodiscard]]
18231823
static write_only_file open(
18241824
io_service& ioService,
1825-
const std::experimental::filesystem::path& path,
1825+
const cppcoro::filesystem::path& path,
18261826
file_open_mode openMode = file_open_mode::create_or_open,
18271827
file_share_mode shareMode = file_share_mode::none,
18281828
file_buffering_mode bufferingMode = file_buffering_mode::default_);
@@ -1836,7 +1836,7 @@ namespace cppcoro
18361836
[[nodiscard]]
18371837
static read_write_file open(
18381838
io_service& ioService,
1839-
const std::experimental::filesystem::path& path,
1839+
const cppcoro::filesystem::path& path,
18401840
file_open_mode openMode = file_open_mode::create_or_open,
18411841
file_share_mode shareMode = file_share_mode::none,
18421842
file_buffering_mode bufferingMode = file_buffering_mode::default_);
@@ -2829,7 +2829,7 @@ coroutine.
28292829

28302830
A type that satisfies `Awaiter<T>` must have, for an instance of the type, `awaiter`:
28312831
- `awaiter.await_ready()` -> `bool`
2832-
- `awaiter.await_suspend(std::experimental::coroutine_handle<void>{})` -> `void` or `bool` or `std::experimental::coroutine_handle<P>` for some `P`.
2832+
- `awaiter.await_suspend(cppcoro::coroutine_handle<void>{})` -> `void` or `bool` or `cppcoro::coroutine_handle<P>` for some `P`.
28332833
- `awaiter.await_resume()` -> `T`
28342834

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

include/cppcoro/async_auto_reset_event.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#ifndef CPPCORO_ASYNC_AUTO_RESET_EVENT_HPP_INCLUDED
66
#define CPPCORO_ASYNC_AUTO_RESET_EVENT_HPP_INCLUDED
77

8-
#include <experimental/coroutine>
8+
#include <cppcoro/coroutine.hpp>
99
#include <atomic>
1010
#include <cstdint>
1111

@@ -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(cppcoro::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+
cppcoro::coroutine_handle<> m_awaiter;
9393
std::atomic<std::uint32_t> m_refCount;
9494

9595
};

include/cppcoro/async_generator.hpp

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
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

Comments
 (0)