]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/coroutine2/example/simple.cpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / coroutine2 / example / simple.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/coroutine2/all.hpp>
11
12using namespace boost::coroutines2;
13
14asymmetric_coroutine<int>::pull_type make_dummy_range()
15{
16 return asymmetric_coroutine<int>::pull_type([](asymmetric_coroutine<int>::push_type& yield)
17 {
18 yield(1);
19 });
20}
21
22int main() {
23 std::distance(make_dummy_range()); // error
24 std::cout << "Done" << std::endl;
25 return EXIT_SUCCESS;
26}