forked from andreasbuhr/cppcoro
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcoroutine.hpp
More file actions
35 lines (25 loc) · 738 Bytes
/
Copy pathcoroutine.hpp
File metadata and controls
35 lines (25 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef CPPCORO_COROUTINE_HPP_INCLUDED
#define CPPCORO_COROUTINE_HPP_INCLUDED
#include <cppcoro/config.hpp>
#ifdef CPPCORO_COROHEADER_FOUND_AND_USABLE
#include <coroutine>
namespace cppcoro {
using std::coroutine_handle;
using std::suspend_always;
using std::noop_coroutine;
using std::suspend_never;
}
#elif __has_include(<experimental/coroutine>)
#include <experimental/coroutine>
namespace cppcoro {
using std::experimental::coroutine_handle;
using std::experimental::suspend_always;
using std::experimental::suspend_never;
#if CPPCORO_COMPILER_SUPPORTS_SYMMETRIC_TRANSFER
using std::experimental::noop_coroutine;
#endif
}
#else
#error Cppcoro requires a C++20 compiler with coroutine support
#endif
#endif