12 Jun
2017
12 Jun
'17
12:30 a.m.
On 9/06/2017 19:43, Andrzej Krzemienski wrote:
It is funny that you should say that. I remember I wanted at some point to test one of Boost's state machines in my toy projects, and I had the exact opposite expectation: when the the new state B was being initialized I wanted to be able to still access the previous state A, to steal (move) some data from it.
Perhaps we had a similar experience then. I remember running into a problem when perfect forwarding was added to a state machine transition method, because it ended up trying to move some data of the prior state after it had been destroyed (it was explicitly destroying the prior state and then forwarding the parameters to the constructor of the new state, in that order).