Skip to content

Commit 81708c2

Browse files
committed
simplify coroutine.hpp header
1 parent 81e9133 commit 81708c2

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

include/cppcoro/coroutine.hpp

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,21 @@
66
#include <coroutine>
77

88
namespace cppcoro {
9-
template<typename Promise=void>
10-
using coroutine_handle = std::coroutine_handle<Promise>;
11-
12-
using suspend_always = std::suspend_always;
13-
using suspend_never = std::suspend_never;
14-
static inline auto noop_coroutine() { return std::noop_coroutine(); }
9+
using std::coroutine_handle;
10+
using std::suspend_always;
11+
using std::noop_coroutine;
12+
using std::suspend_never;
1513
}
1614

1715
#elif __has_include(<experimental/coroutine>)
1816

1917
#include <experimental/coroutine>
2018

2119
namespace cppcoro {
22-
template<typename Promise=void>
23-
using coroutine_handle = std::experimental::coroutine_handle<Promise>;
24-
25-
using suspend_always = std::experimental::suspend_always;
26-
using suspend_never = std::experimental::suspend_never;
27-
static inline auto noop_coroutine() { return std::experimental::noop_coroutine(); }
20+
using std::experimental::coroutine_handle;
21+
using std::experimental::suspend_always;
22+
using std::experimental::suspend_never;
23+
using std::experimental::noop_coroutine;
2824
}
2925

3026
#else

0 commit comments

Comments
 (0)