ADTarm-ehast-experimentalcleanup-dtorsenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since 13b1b1d was
aa22c60,
checked in by tdelisle <tdelisle@…>, 5 years ago
|
Moved c++Cor example to examples folder
|
-
Property mode set to
100644
|
File size:
418 bytes
|
Rev | Line | |
---|
[be3416d] | 1 | #include <iostream> |
---|
| 2 | #include <experimental/coroutine> |
---|
| 3 | |
---|
| 4 | struct suspend_never { |
---|
| 5 | bool await_ready() noexcept { |
---|
| 6 | return true; |
---|
| 7 | } |
---|
| 8 | |
---|
| 9 | void await_suspend(std::experimental::coroutine_handle<>) noexcept {} |
---|
| 10 | void await_resume() noexcept {} |
---|
| 11 | }; |
---|
| 12 | |
---|
| 13 | struct suspend_always { |
---|
| 14 | bool await_ready() noexcept { |
---|
| 15 | return false; |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | void await_suspend(std::experimental::coroutine_handle<>) noexcept {} |
---|
| 19 | void await_resume() noexcept {} |
---|
| 20 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.