diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2016-09-14 07:26:45 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2016-09-14 09:17:02 +0000 |
commit | 631e0219e0cbea34c2d02b3d44ab16ce4abb5e22 (patch) | |
tree | 9d3a81dbe55371fefab9217253420cf139399dc3 /filedistribution | |
parent | 18518bb0854e4259b4b3b3f9801c66d71af08564 (diff) |
c++11 lambdas
Diffstat (limited to 'filedistribution')
-rw-r--r-- | filedistribution/src/vespa/filedistribution/common/componentsdeleter.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/filedistribution/src/vespa/filedistribution/common/componentsdeleter.h b/filedistribution/src/vespa/filedistribution/common/componentsdeleter.h index e7086f87333..055f5fab242 100644 --- a/filedistribution/src/vespa/filedistribution/common/componentsdeleter.h +++ b/filedistribution/src/vespa/filedistribution/common/componentsdeleter.h @@ -39,7 +39,7 @@ class ComponentsDeleter { template <class T> void requestDelete(T* component) { - _deleteRequests.push(std::bind(&ComponentsDeleter::deleteComponent<T>, this, component)); + _deleteRequests.push([&, component]() { deleteComponent<T>(component); }); } void waitForAllComponentsDeleted(); @@ -65,7 +65,7 @@ class ComponentsDeleter { } _trackedComponents[t] = typeid(t).name(); - return std::shared_ptr<T>(t, std::bind(&ComponentsDeleter::requestDelete<T>, this, t)); + return std::shared_ptr<T>(t, [&](T * p) { requestDelete<T>(p); }); } }; } |