]>
Commit | Line | Data |
---|---|---|
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 | ||
12 | using namespace boost::coroutines2; | |
13 | ||
14 | asymmetric_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 | ||
22 | int main() { | |
23 | std::distance(make_dummy_range()); // error | |
24 | std::cout << "Done" << std::endl; | |
25 | return EXIT_SUCCESS; | |
26 | } |