Probably make sense to re-implement this class through pimpl
-approach
#2172
Replies: 5 comments
-
This is the state of
Given that |
Beta Was this translation helpful? Give feedback.
-
I have justification now only on level of idea: better to copy only one |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
I think |
Beta Was this translation helpful? Give feedback.
-
@akukanov, additionally I want to highlight that here we have one additional copy of |
Beta Was this translation helpful? Give feedback.
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_impl
throughpimpl
-approach(https://en.cppreference.com/w/cpp/language/pimpl)In this case we will copy/move only one smart-pointer when returns
__future
instance with__result_and_scratch_storage_impl
instance inside from functions and so far and so on.Beta Was this translation helpful? Give feedback.
All reactions