Skip to content

[pull] master from boostorg:master #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 42 commits into from
Sep 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
498302a
Inheriting std::iterator is deprecated in C++17
DanielaE Jan 1, 2018
a024b32
Merge pull request #33 from DanielaE/fix/no-iterator-inheritance
olk Jan 1, 2018
58c74e7
Update README.md
olk Feb 5, 2018
af2d3ba
Update README.md
olk Feb 5, 2018
6115da1
remove duplicate unit-test
olk Mar 12, 2018
c69093a
Merge branch 'develop'
olk Mar 12, 2018
21ce294
fixed example: iterate all left items
Mar 23, 2018
8df277d
Merge pull request #34 from lorond/master
olk Mar 23, 2018
f226f9b
remove deprecation warning requested by Vinnie Falco
olk Dec 13, 2018
6c37e98
Fix Windows dll-interface compilation warnings:
vinniefalco Dec 20, 2018
444c6e8
Merge pull request #36 from vinniefalco/develop
olk Dec 20, 2018
bcc149c
Removed linking with Boost.System.
Lastique Jan 14, 2019
aefcb87
Merge pull request #37 from Lastique/remove_linking_system
olk Jan 14, 2019
d20833c
Merge branch 'develop'
olk Jan 22, 2019
2090b4a
Don't crash on pthread_cancel
olk Mar 14, 2019
f6741b3
Merge branch 'develop'
olk Mar 20, 2019
e03129e
Fix project names clash
Kojoley Nov 24, 2019
3bc66cb
Move library include to the top
Kojoley Nov 24, 2019
a3e511f
Cease dependence on Range
Kojoley Nov 24, 2019
928e70c
Merge pull request #41 from Kojoley/fix-project-names-clash
olk Nov 25, 2019
d698d19
Merge pull request #42 from Kojoley/move-library-inclusion-to-top
olk Nov 25, 2019
d5e610c
Merge pull request #43 from Kojoley/cease-dependence-on-mpl
olk Nov 25, 2019
25b1690
Fix project names clash
Kojoley Nov 24, 2019
a554eb0
Move library include to the top
Kojoley Nov 24, 2019
0c556bb
Cease dependence on Range
Kojoley Nov 24, 2019
436e1db
Revert "Cease dependence on Range"
olk Dec 1, 2019
143edd3
Merge branch 'develop'
olk Dec 1, 2019
9c73b2f
Revert "Cease dependence on Range"
olk Mar 30, 2020
0203086
split-stack flag for GCC
EGuesnet Jun 26, 2020
39db8c4
split-stack flag for GCC
EGuesnet Jun 26, 2020
b5ec4dc
Merge pull request #52 from EGuesnet/split-stack-flag
olk Jun 26, 2020
58764c4
split-stack flag for GCC
EGuesnet Jun 26, 2020
b62ddd1
split-stack flag for GCC
EGuesnet Jun 26, 2020
162889a
-fsplit-stack flag with GCC
olk Jun 26, 2020
86cc305
Merge branch 'develop'
olk Jun 26, 2020
9ba7eea
Cease dependence on Range
Kojoley Nov 24, 2019
c08aa27
Missed begin/end. Follow-up to PR#43
Kojoley Dec 1, 2019
69ba7f8
Merge branch 'develop'
olk Jul 2, 2020
05e2576
Use a non-deprecated header
vinniefalco Aug 11, 2020
e632110
Merge pull request #55 from vinniefalco/fix-header
olk Aug 11, 2020
1718921
Use a non-deprecated header
vinniefalco Aug 11, 2020
21b704e
Merge branch 'develop'
olk Aug 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ allows re-entering subroutines more than once (useful if state must be kept acro
Coroutines can be viewed as a language-level construct providing a special kind of control flow.

In contrast to threads, which are pre-emptive, coroutines switches are cooperative (programmer controls
when a switch will happen). The kernel is not involved in the coroutine switches.
when a switch will happen). The kernel is not involved in the coroutine switches.

Note that boost.coroutine is deprecated - boost.coroutine2 is its successor.
If you are forced to use a pre-C++11 compiler you should still use boost.coroutine.
6 changes: 2 additions & 4 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ import toolset ;
project boost/coroutine
: requirements
<library>/boost/context//boost_context
<library>/boost/system//boost_system
<library>/boost/thread//boost_thread
<toolset>gcc,<segmented-stacks>on:<cxxflags>-fsplit-stack
<toolset>gcc,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS
<target-os>linux,<toolset>gcc,<segmented-stacks>on:<cxxflags>-fsplit-stack
<target-os>linux,<toolset>gcc,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS
<toolset>clang,<segmented-stacks>on:<cxxflags>-fsplit-stack
<toolset>clang,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS
<link>shared:<define>BOOST_COROUTINES_DYN_LINK=1
Expand All @@ -40,7 +39,6 @@ lib boost_coroutine
exceptions.cpp
stack_traits_sources
: <link>shared:<library>../../context/build//boost_context
<link>shared:<library>../../system/build//boost_system
<link>shared:<library>../../thread/build//boost_thread
;

Expand Down
6 changes: 3 additions & 3 deletions example/asymmetric/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import modules ;
import os ;
import toolset ;

project boost/coroutine/example
project boost/coroutine/example/asymmetric
: requirements
<library>/boost/context//boost_context
<library>/boost/coroutine//boost_coroutine
<library>/boost/program_options//boost_program_options
<toolset>gcc,<segmented-stacks>on:<cxxflags>-fsplit-stack
<toolset>gcc,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS
<target-os>linux,<toolset>gcc,<segmented-stacks>on:<cxxflags>-fsplit-stack
<target-os>linux,<toolset>gcc,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS
<toolset>clang,<segmented-stacks>on:<cxxflags>-fsplit-stack
<toolset>clang,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS
<link>shared
Expand Down
3 changes: 2 additions & 1 deletion example/asymmetric/chaining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/coroutine/all.hpp>

#include <iostream>
#include <iomanip>
#include <string>
#include <cctype>
#include <sstream>

#include <boost/bind.hpp>
#include <boost/coroutine/all.hpp>
#include <boost/foreach.hpp>

typedef boost::coroutines::asymmetric_coroutine<std::string> coro_t;
Expand Down
3 changes: 2 additions & 1 deletion example/asymmetric/echo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/coroutine/all.hpp>

#include <cstdlib>
#include <iostream>

#include <boost/bind.hpp>
#include <boost/coroutine/all.hpp>

typedef boost::coroutines::asymmetric_coroutine< void >::pull_type pull_coro_t;
typedef boost::coroutines::asymmetric_coroutine< void >::push_type push_coro_t;
Expand Down
3 changes: 2 additions & 1 deletion example/asymmetric/exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/coroutine/all.hpp>

#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <string>

#include <boost/bind.hpp>
#include <boost/coroutine/all.hpp>
#include <boost/throw_exception.hpp>

typedef boost::coroutines::asymmetric_coroutine< int >::pull_type pull_coro_t;
Expand Down
3 changes: 2 additions & 1 deletion example/asymmetric/fibonacci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/coroutine/all.hpp>

#include <cstdlib>
#include <iostream>

#include <boost/range.hpp>
#include <boost/coroutine/all.hpp>

void fibonacci( boost::coroutines::asymmetric_coroutine< int >::push_type & sink)
{
Expand Down
3 changes: 2 additions & 1 deletion example/asymmetric/layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/coroutine/all.hpp>

#include <iostream>
#include <iomanip>
#include <vector>
Expand All @@ -12,7 +14,6 @@

#include <boost/assign/list_of.hpp>
#include <boost/bind.hpp>
#include <boost/coroutine/all.hpp>
#include <boost/range.hpp>

struct FinalEOL
Expand Down
3 changes: 2 additions & 1 deletion example/asymmetric/parallel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/coroutine/all.hpp>

#include <cstdlib>
#include <iostream>

#include <boost/bind.hpp>
#include <boost/coroutine/all.hpp>

void first( boost::coroutines::asymmetric_coroutine< void >::push_type & sink)
{
Expand Down
3 changes: 2 additions & 1 deletion example/asymmetric/power.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/coroutine/all.hpp>

#include <cstdlib>
#include <iostream>

#include <boost/bind.hpp>
#include <boost/foreach.hpp>
#include <boost/range.hpp>
#include <boost/coroutine/all.hpp>

void power( boost::coroutines::asymmetric_coroutine< int >::push_type & sink, int number, int exponent)
{
Expand Down
3 changes: 2 additions & 1 deletion example/asymmetric/same_fringe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/coroutine/all.hpp>

#include <cstddef>
#include <cstdlib>
#include <iostream>
Expand All @@ -14,7 +16,6 @@
#include <boost/bind.hpp>
#include <boost/range.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/coroutine/all.hpp>

struct node
{
Expand Down
3 changes: 2 additions & 1 deletion example/asymmetric/segmented_stack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/coroutine/all.hpp>

#include <iostream>

#include <boost/assert.hpp>
#include <boost/config.hpp>
#include <boost/coroutine/all.hpp>

int count = 384;

Expand Down
3 changes: 2 additions & 1 deletion example/asymmetric/simple.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#include <boost/coroutine/all.hpp>

#include <cstdlib>
#include <iostream>

#include <boost/bind.hpp>
#include <boost/coroutine/all.hpp>

#include "X.h"

Expand Down
3 changes: 2 additions & 1 deletion example/asymmetric/test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <boost/bind.hpp>
#include <boost/coroutine/all.hpp>

#include <boost/bind.hpp>

#include "X.h"

typedef boost::coroutines::asymmetric_coroutine< X& >::pull_type pull_coro_t;
Expand Down
3 changes: 2 additions & 1 deletion example/asymmetric/tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
#ifndef TREE_H
#define TREE_H

#include <boost/coroutine/all.hpp>

#include <cstddef>
#include <string>

#include <boost/assert.hpp>
#include <boost/config.hpp>
#include <boost/coroutine/all.hpp>
#include <boost/intrusive_ptr.hpp>

#if defined(_MSC_VER)
Expand Down
3 changes: 2 additions & 1 deletion example/asymmetric/unwind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/coroutine/all.hpp>

#include <cstdlib>
#include <iostream>

#include <boost/bind.hpp>
#include <boost/coroutine/all.hpp>

struct X : private boost::noncopyable
{
Expand Down
6 changes: 3 additions & 3 deletions example/symmetric/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ import modules ;
import os ;
import toolset ;

project boost/coroutine/example
project boost/coroutine/example/symmetric
: requirements
<library>/boost/context//boost_context
<library>/boost/coroutine//boost_coroutine
<library>/boost/program_options//boost_program_options
<library>/boost/random//boost_random
<toolset>gcc,<segmented-stacks>on:<cxxflags>-fsplit-stack
<toolset>gcc,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS
<target-os>linux,<toolset>gcc,<segmented-stacks>on:<cxxflags>-fsplit-stack
<target-os>linux,<toolset>gcc,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS
<toolset>clang,<segmented-stacks>on:<cxxflags>-fsplit-stack
<toolset>clang,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS
<link>static
Expand Down
3 changes: 2 additions & 1 deletion example/symmetric/dice_game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/coroutine/all.hpp>

#include <cstdlib>
#include <iostream>

#include <boost/bind.hpp>
#include <boost/coroutine/all.hpp>
#include <boost/move/move.hpp>
#include <boost/random/random_device.hpp>
#include <boost/random/uniform_int_distribution.hpp>
Expand Down
5 changes: 3 additions & 2 deletions example/symmetric/merge_arrays.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/coroutine/all.hpp>

#include <cstdlib>
#include <cstddef>
#include <iostream>
#include <vector>

#include <boost/bind.hpp>
#include <boost/coroutine/all.hpp>
#include <boost/foreach.hpp>

typedef boost::coroutines::symmetric_coroutine< void > coro_t;
Expand All @@ -30,7 +31,7 @@ class merger
to_.push_back(from[idx++]);
}
while ( to_.size() < max_)
to_.push_back( other->from[other->idx]);
to_.push_back( other->from[other->idx++]);
}

merger( merger const&);
Expand Down
3 changes: 2 additions & 1 deletion example/symmetric/segmented_stack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/coroutine/all.hpp>

#include <iostream>

#include <boost/assert.hpp>
#include <boost/config.hpp>
#include <boost/coroutine/all.hpp>
#include <boost/thread.hpp>

int count = 384;
Expand Down
3 changes: 2 additions & 1 deletion example/symmetric/simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/coroutine/all.hpp>

#include <cstdlib>
#include <iostream>

#include <boost/bind.hpp>
#include <boost/coroutine/all.hpp>

typedef boost::coroutines::symmetric_coroutine< void > coro_t;

Expand Down
3 changes: 2 additions & 1 deletion example/symmetric/unwind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/coroutine/all.hpp>

#include <cstdlib>
#include <iostream>

#include <boost/bind.hpp>
#include <boost/coroutine/all.hpp>

struct X : private boost::noncopyable
{
Expand Down
Loading