Skip to content

Commit

Permalink
Merge pull request #4103 from ShmuelLevine/patch-3
Browse files Browse the repository at this point in the history
Add this to lambda capture list
  • Loading branch information
hkaiser committed Oct 9, 2019
2 parents fa2ae9e + 914212c commit 25fcb78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion hpx/lcos/local/channel.hpp
Expand Up @@ -267,7 +267,7 @@ namespace hpx { namespace lcos { namespace local
}
local::packaged_task<T()> pop_pt()
{
return local::packaged_task<T()>([=]() -> T { return get(); });
return local::packaged_task<T()>([this]() -> T { return get(); });
}

public:
Expand Down
16 changes: 7 additions & 9 deletions hpx/runtime/parcelset/parcelhandler.hpp
Expand Up @@ -197,11 +197,10 @@ namespace hpx { namespace parcelset
/// id (if not already set).
HPX_FORCEINLINE void put_parcel(parcel p)
{
auto f =
[=](boost::system::error_code const& ec, parcel const& p) -> void
{
invoke_write_handler(ec, p);
};
auto f = [this](boost::system::error_code const& ec,
parcel const& p) -> void {
invoke_write_handler(ec, p);
};

put_parcel(std::move(p), std::move(f));
}
Expand Down Expand Up @@ -238,10 +237,9 @@ namespace hpx { namespace parcelset
/// id (if not already set).
void put_parcels(std::vector<parcel> parcels)
{
std::vector<write_handler_type> handlers(parcels.size(), [=](
boost::system::error_code const& ec, parcel const & p) -> void {
return invoke_write_handler(ec, p);
});
std::vector<write_handler_type> handlers(parcels.size(),
[this](boost::system::error_code const& ec, parcel const& p)
-> void { return invoke_write_handler(ec, p); });

put_parcels(std::move(parcels), std::move(handlers));
}
Expand Down

0 comments on commit 25fcb78

Please sign in to comment.