[squid-dev] [PATCH] TidyPointer removal
Alex Rousskov
rousskov at measurement-factory.com
Wed Jun 29 14:38:12 UTC 2016
On 06/29/2016 05:45 AM, Amos Jeffries wrote:
> On 29/06/2016 1:03 p.m., Alex Rousskov wrote:
>> To make progress, I will rephrase the question: What unique_ptr
>> properties prevent you from using it for LockingPointer::raw?
> The ability to copy-assign
Aha, this does compute! By design, LockingPointer is CopyAssignable so
it cannot be implemented using a non-CopyAssignable unique_ptr. This
explanation removes my incorrect objection to duplicating
unique_ptr/TidyPointer functionality in the new LockingPointer.
> std::function creates a Functor.
Yes.
> So as I said unique_ptr uses a Functor type.
This statement remains inaccurate/misleading -- unique_ptr does accept
non-functors as well as functors. However, the specific usage of
unique_ptr that we are discussing here prohibits non-functors because
only functors may have default constructors.
I hope to look through the new patch within 36 hours.
Thank you,
Alex.
More information about the squid-dev
mailing list