swebb2066 commented on pull request #96:
URL: https://github.com/apache/logging-log4cxx/pull/96#issuecomment-1004441759


   To copy a shared_ptr the reference count must be incremented, for which a 
lock must be acquired.
   
   By returning a const reference, the caller can decide whether to copy the 
shared_ptr. The compiler will complain when the const reference is passed to a 
function requiring a non-const reference.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to