19 Mar
2009
19 Mar
'09
11:15 p.m.
On Thu, Mar 19, 2009 at 3:49 PM, Ovanes Markarian
For boost::shared_ptr it's the same. Nothing is copied in both cases. Some compilers might (which is under doubt) optimize it better. Since const is an additional information for them, that the object is not going to change within the called function.
Const in a reference is merely part of the type safety system. Compilers can not do optimizations based on the constness of a reference, all they can do is report errors. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode