Skip to content
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

Cannot create a fiber with the tip of Boost.Context on g++ 5.2.1 #69

Closed
tgockel opened this issue Nov 17, 2015 · 3 comments
Closed

Cannot create a fiber with the tip of Boost.Context on g++ 5.2.1 #69

tgockel opened this issue Nov 17, 2015 · 3 comments

Comments

@tgockel
Copy link

tgockel commented Nov 17, 2015

When trying to use Boost.Fiber with the tip of Boost.Context, I get a horrendous compilation error with basic use -- attached.

// Event the simplest case does not work:
boost::fibers::fiber f([] () {});

It looks like this broke with this change in Boost.Context: 43d89cb6396706871ce9378c8e3b2c63e93ffe0e - support passing argument between execution_context.

The preceding commit works perfectly fine for me: 01660915c1330a186ed0548b436065a9fc8ec96c

My compiler is g++ 5.2.1.

@olk
Copy link
Member

olk commented Nov 17, 2015

lambda requires argument: [] (void*vp) {};

@olk olk closed this as completed Nov 17, 2015
@tgockel
Copy link
Author

tgockel commented Nov 17, 2015

Clearly I'm missing something, because this code also fails to compile:

#include <boost/fiber/all.hpp>

void foo()
{
    boost::fibers::fiber f([] (void*) {});
    f.detach();
}

As does this:

#include <boost/fiber/all.hpp>

void bar()
{
    boost::fibers::packaged_task<void ()> task([] () {});
    boost::fibers::fiber f(std::move(task));
    f.detach();
}

Keep in mind that this works with the Boost.Context released with 1.59, but does not with the current tip of Boost.Context. It changed with Boost.Context changeset 43d89cb. This does not seem intentionally broken.

@olk
Copy link
Member

olk commented Nov 18, 2015

Keep in mind that boost.fiber is still in development
you should use branch develop for boost.context and boost.fiber

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants