Boost C++ Libraries: Ticket #12221: coroutine<>::push_type function starts without pushing https://svn.boost.org/trac10/ticket/12221 <p> According to coroutine2 docs: "In contrast to coroutine&lt;&gt;::pull_type, instantiating an coroutine&lt;&gt;::push_type does not pass the control of execution to coroutine-function - instead the first call of coroutine&lt;&gt;::push_type::operator() synthesizes a complementary coroutine&lt;&gt;::pull_type and passes it as reference to coroutine-function. " </p> <p> So the function of a push-coroutine should never be entered unless at least one value is pushed. But the coroutine always tries to unwind in destructor and mistakenly resumes the function. Example attached. </p> <p> This bug is present in coroutine2. Original coroutine library is unaffected. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12221 Trac 1.4.3 valentin.milea@… Sun, 22 May 2016 09:16:09 GMT attachment set https://svn.boost.org/trac10/ticket/12221 https://svn.boost.org/trac10/ticket/12221 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">coro2_unwind_bug.cpp</span> </li> </ul> Ticket olli Sun, 22 May 2016 15:38:45 GMT <link>https://svn.boost.org/trac10/ticket/12221#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12221#comment:1</guid> <description> <p> thx, fixed </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Sun, 22 May 2016 15:38:53 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/12221#comment:2 https://svn.boost.org/trac10/ticket/12221#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket