Closed lebdron closed 6 years ago
Thank you!
The shared_ptr<>
will undo the performance provided by the recursed pattern. Another approach to try is to make exit_recursed_scope_type
moveable and only set that->requestor = nullptr
when that != nullptr
. The move constructor would make sure that only the destination had that != nullptr
@kirkshoop Thank you for clarification. I have applied the changes as you have described.
Looks great!
Because of disabled RVO,
exit_recursed_scope_type
destructor was called on return statement inrecursed_scope_type::reset
, making the call ineffective. This change allows to use it as intended when RVO is disabled.