This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Template-based Coroutine continuation idea by Ross Bencina <[email protected]> May 2014. | |
// see: https://groups.google.com/forum/#!topic/comp.lang.c++.moderated/ryhWI6cX3Ko | |
#include <iostream> | |
class MyCoroutine { | |
typedef MyCoroutine this_t; | |
typedef bool (this_t::*coroutine_fn_t) (); | |
coroutine_fn_t next_; |