← Back to team overview

yade-users team mailing list archive

Re: [Question #684115]: Some basic concepts in FrictPhys.cpp

 

Question #684115 on Yade changed:
https://answers.launchpad.net/yade/+question/684115

Bruno Chareyre proposed the following answer:
> According to stack overflow, a const shared_ptr<FrictPhys> contactPhys
(sans &), would mean that contactPhysics is constant [1].

I don't think so. With 'const shared_ptr<FrictPhys> contactPhys ' the
pointed data would not be constant, as opposed to 'shared_ptr<const
FrictPhys> contactPhys '.

The role of '&' is only to avoid reference counting (it is the
conventional method to pass shared_ptr).

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.