]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/context/example/fibonacci.cpp
2 // Copyright Oliver Kowalke 2016.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
11 #include <boost/context/continuation.hpp>
13 namespace ctx
= boost::context
;
17 ctx::continuation c
=ctx::callcc(
18 [&a
](ctx::continuation
&& c
){
29 for ( int j
= 0; j
< 10; ++j
) {
30 std::cout
<< a
<< " ";
33 std::cout
<< std::endl
;
34 std::cout
<< "main: done" << std::endl
;