mirror of
https://github.com/boostorg/coroutine.git
synced 2026-01-30 07:42:52 +00:00
coroutine: remove deprecated interface
[SVN r86521]
This commit is contained in:
@@ -70,13 +70,9 @@ void reschedule()
|
||||
|
||||
// ___________________________________________________________ //
|
||||
|
||||
#ifdef BOOST_COROUTINES_UNIDIRECT
|
||||
typedef coroutines::coroutine<void>::pull_type coro_pull;
|
||||
typedef coroutines::coroutine<void>::push_type coro_push;
|
||||
#else
|
||||
typedef coroutines::coroutine<void()> coro_pull;
|
||||
typedef coroutines::coroutine<void()>::caller_type coro_push;
|
||||
#endif
|
||||
|
||||
struct CurrentCoro
|
||||
{
|
||||
std::shared_ptr<coro_pull> coro;
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include <boost/coroutine/all.hpp>
|
||||
|
||||
#ifdef BOOST_COROUTINES_UNIDIRECT
|
||||
int main()
|
||||
{
|
||||
boost::coroutines::coroutine< int >::pull_type source(
|
||||
@@ -33,28 +32,3 @@ int main()
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
#else
|
||||
int main()
|
||||
{
|
||||
boost::coroutines::coroutine< int() > c(
|
||||
[&]( boost::coroutines::coroutine< void( int) > & c) {
|
||||
int first = 1, second = 1;
|
||||
c( first);
|
||||
c( second);
|
||||
for ( int i = 0; i < 8; ++i)
|
||||
{
|
||||
int third = first + second;
|
||||
first = second;
|
||||
second = third;
|
||||
c( third);
|
||||
}
|
||||
});
|
||||
|
||||
for ( auto i : c)
|
||||
std::cout << i << " ";
|
||||
|
||||
std::cout << "\nDone" << std::endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user