Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Attributes

Class attributes is used to specify parameters required to setup a coroutine's context.

enum flag_unwind_t
{
    stack_unwind,
    no_stack_unwind
};

struct attributes
{
    std::size_t     size;
    flag_unwind_t   do_unwind;

    attributes() noexcept;

    explicit attributes( std::size_t size_) noexcept;

    explicit attributes( flag_unwind_t do_unwind_) noexcept;

    explicit attributes( std::size_t size_, flag_unwind_t do_unwind_) noexcept;
};

attributes()

Effects:

Default constructor using boost::context::default_stacksize(), does unwind the stack after coroutine/generator is complete.

Throws:

Nothing.

attributes( std::size_t size)

Effects:

Argument size defines stack size of the new coroutine. Stack unwinding after termination.

Throws:

Nothing.

attributes( flag_unwind_t do_unwind)

Effects:

Argument do_unwind determines if stack will be unwound after termination or not. The default stacksize is used for the new coroutine.

Throws:

Nothing.

attributes( std::size_t size, flag_unwind_t do_unwind)

Effects:

Arguments size and do_unwind are given by the user.

Throws:

Nothing.


PrevUpHomeNext