]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/context/example/v2/jump_void.cpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / context / example / v2 / jump_void.cpp
CommitLineData
7c673cae
FG
1
2// Copyright Oliver Kowalke 2014.
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)
6
7#include <cstdlib>
8#include <iostream>
9
10#include <boost/context/all.hpp>
11
12namespace ctx = boost::context;
13
14ctx::execution_context< void > f1( ctx::execution_context< void > ctxm) {
15 std::cout << "f1: entered first time" << std::endl;
16 ctxm = ctxm();
17 std::cout << "f1: entered second time" << std::endl;
18 return ctxm;
19}
20
21int main() {
22 ctx::execution_context< void > ctx1( f1);
23 ctx1 = ctx1();
24 std::cout << "f1: returned first time" << std::endl;
25 ctx1 = ctx1();
26 std::cout << "f1: returned second time" << std::endl;
27
28 std::cout << "main: done" << std::endl;
29
30 return EXIT_SUCCESS;
31}