mirror of
https://github.com/boostorg/coroutine.git
synced 2026-01-30 19:52:18 +00:00
coroutine: remove deprecated interface
[SVN r86521]
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/coroutine/all.hpp>
|
||||
|
||||
#ifdef BOOST_COROUTINES_UNIDIRECT
|
||||
typedef boost::coroutines::coroutine< void >::pull_type pull_coro_t;
|
||||
typedef boost::coroutines::coroutine< void >::push_type push_coro_t;
|
||||
|
||||
@@ -46,39 +45,3 @@ int main( int argc, char * argv[])
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
#else
|
||||
typedef boost::coroutines::coroutine< void() > coro_t;
|
||||
|
||||
void echo( coro_t & ca, int i)
|
||||
{
|
||||
std::cout << i;
|
||||
ca();
|
||||
}
|
||||
|
||||
void runit( coro_t & ca)
|
||||
{
|
||||
std::cout << "started! ";
|
||||
for ( int i = 0; i < 10; ++i)
|
||||
{
|
||||
coro_t c( boost::bind( echo, _1, i) );
|
||||
while ( c)
|
||||
c();
|
||||
ca();
|
||||
}
|
||||
}
|
||||
|
||||
int main( int argc, char * argv[])
|
||||
{
|
||||
{
|
||||
coro_t c( runit);
|
||||
while ( c) {
|
||||
std::cout << "-";
|
||||
c();
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "\nDone" << std::endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user