Repository navigation
Probably make sense to re-implement this class through pimpl-approach
#2172
Replies: 5 comments
|
This is the state of Given that |
|
I have justification now only on level of idea: better to copy only one |
|
Why are shared pointers used here in the first place? Is it just for RAII memory management, or also for lifetime control (i.e., there are other "owners" of these objects besides For similar reasons, I do not like the idea of |
|
I think |
|
@akukanov, additionally I want to highlight that here we have one additional copy of |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Probably make sense to re-implement this class
__result_and_scratch_storage_implthroughpimpl-approach(https://en.cppreference.com/w/cpp/language/pimpl)In this case we will copy/move only one smart-pointer when returns
__futureinstance with__result_and_scratch_storage_implinstance inside from functions and so far and so on.All reactions