You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a lot of classes where we store dependencies that we don't own as a shared_ptr. This disturbs local reasoning and it's better to use a non-owning reference like std::reference_wrapper.
Solution
Use std::reference_wrapper instead for non-owned dependencies.
The text was updated successfully, but these errors were encountered:
Summary
We have a lot of classes where we store dependencies that we don't own as a
shared_ptr
. This disturbs local reasoning and it's better to use a non-owning reference likestd::reference_wrapper
.Solution
Use
std::reference_wrapper
instead for non-owned dependencies.The text was updated successfully, but these errors were encountered: