Re: [Boost-bugs] [Boost C++ Libraries] #10080: Make optional copy-ctor

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10080: Make optional copy-ctor
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-05-31 08:14:42


#10080: Make optional copy-ctor
-------------------------------+-----------------------
  Reporter: voivoid@… | Owner: olli
      Type: Feature Requests | Status: closed
 Milestone: To Be Determined | Component: coroutine
   Version: Boost 1.55.0 | Severity: Problem
Resolution: invalid | Keywords:
-------------------------------+-----------------------
Changes (by olli):

 * status: new => closed
 * resolution: => invalid

Comment:

 making coroutine copy-able would require to copy the stack. this is
 dangerous even with POD.
 you get unexpected behaviour if you copy a stack which has
 references/pointers to objects on the stack.


 {{{
 int i = 0;
 ...
 int * j = & i;
 }}}


 If you copy the stack above, j of the new (copied-to) stack would contain
 the address of i of the original (copied-from) stack.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10080#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC