TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
coroutine.hpp
1#ifndef CPPCORO_COROUTINE_HPP_INCLUDED
2#define CPPCORO_COROUTINE_HPP_INCLUDED
3
4#include "config.hpp"
5
6#ifdef CPPCORO_COROHEADER_FOUND_AND_USABLE
7
8#include <coroutine>
9
10namespace cppcoro {
11 using std::coroutine_handle;
12 using std::suspend_always;
13 using std::noop_coroutine;
14 using std::suspend_never;
15}
16
17#elif __has_include(<experimental/coroutine>)
18
19#include <experimental/coroutine>
20
21namespace cppcoro {
22 using std::experimental::coroutine_handle;
23 using std::experimental::suspend_always;
24 using std::experimental::suspend_never;
25
26#if CPPCORO_COMPILER_SUPPORTS_SYMMETRIC_TRANSFER
27 using std::experimental::noop_coroutine;
28#endif
29}
30
31#else
32#error Cppcoro requires a C++20 compiler with coroutine support
33#endif
34
35#endif