C++ Logo


Advanced search

Re: [SG10] P0018 and P0170: lambda-related changes

From: Jens Maurer <Jens.Maurer_at_[hidden]>
Date: Fri, 11 Mar 2016 23:16:24 +0100
On 03/11/2016 10:02 PM, John Spicer wrote:
> Even though it doesn’t fully express the feature, I prefer __cpp_capture_this for its brevity.


> There is also some sentiment for getting rid of the existing “capture this by value” semantics that we decided aren’t what people really want (i.e., at some point making capture this by value the same thing as the new capture of *this). At that point, we could bump the value of __cpp_capture_this (and all would be right with the world :-)

I know this isn't the right forum, but so far, I've only needed to
capture [this] (the pointer value), not the entire object. This is
for callback functions from network events. I want to call a
member function of my "connection" class. Of course, I shouldn't
copy the entire "connection" class for that.


Received on 2016-03-11 23:16:30