20
20
21
21
_LIBCPP_BEGIN_NAMESPACE_STD
22
22
23
- # if __has_builtin(__builtin_coro_noop) || defined(_LIBCPP_COMPILER_GCC)
24
-
25
23
// [coroutine.noop]
26
24
// [coroutine.promise.noop]
27
25
struct noop_coroutine_promise {};
@@ -56,12 +54,12 @@ struct coroutine_handle<noop_coroutine_promise> {
56
54
private:
57
55
_LIBCPP_HIDE_FROM_ABI friend coroutine_handle<noop_coroutine_promise> noop_coroutine () noexcept ;
58
56
59
- # if __has_builtin(__builtin_coro_noop)
57
+ # if __has_builtin(__builtin_coro_noop)
60
58
_LIBCPP_HIDE_FROM_ABI coroutine_handle () noexcept { this ->__handle_ = __builtin_coro_noop (); }
61
59
62
60
void * __handle_ = nullptr ;
63
61
64
- # elif defined(_LIBCPP_COMPILER_GCC)
62
+ # elif defined(_LIBCPP_COMPILER_GCC)
65
63
// GCC doesn't implement __builtin_coro_noop().
66
64
// Construct the coroutine frame manually instead.
67
65
struct __noop_coroutine_frame_ty_ {
@@ -78,20 +76,18 @@ struct coroutine_handle<noop_coroutine_promise> {
78
76
79
77
_LIBCPP_HIDE_FROM_ABI coroutine_handle () noexcept = default;
80
78
81
- # endif // __has_builtin(__builtin_coro_noop)
79
+ # endif // __has_builtin(__builtin_coro_noop)
82
80
};
83
81
84
82
using noop_coroutine_handle = coroutine_handle<noop_coroutine_promise>;
85
83
86
- # if defined(_LIBCPP_COMPILER_GCC)
84
+ # if defined(_LIBCPP_COMPILER_GCC)
87
85
inline noop_coroutine_handle::__noop_coroutine_frame_ty_ noop_coroutine_handle::__noop_coroutine_frame_{};
88
- # endif
86
+ # endif
89
87
90
88
// [coroutine.noop.coroutine]
91
89
inline _LIBCPP_HIDE_FROM_ABI noop_coroutine_handle noop_coroutine () noexcept { return noop_coroutine_handle (); }
92
90
93
- # endif // __has_builtin(__builtin_coro_noop) || defined(_LIBCPP_COMPILER_GCC)
94
-
95
91
_LIBCPP_END_NAMESPACE_STD
96
92
97
93
#endif // _LIBCPP_STD_VER >= 20
0 commit comments