diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2016-09-13 21:11:30 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2016-09-14 09:16:58 +0000 |
commit | 5d1b76fef0112feaacae32445c8156df97a0d2a7 (patch) | |
tree | e46cf1be9a11b24d67bc63149e6f9ca4486f940a | |
parent | 523cb10987d15dcca331791c04c41de0cd43b4ce (diff) |
c++11 lambdas
-rw-r--r-- | filedistribution/src/vespa/filedistribution/model/zkfacade.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/filedistribution/src/vespa/filedistribution/model/zkfacade.cpp b/filedistribution/src/vespa/filedistribution/model/zkfacade.cpp index 8f945e1e59d..17ba3d31973 100644 --- a/filedistribution/src/vespa/filedistribution/model/zkfacade.cpp +++ b/filedistribution/src/vespa/filedistribution/model/zkfacade.cpp @@ -9,8 +9,6 @@ #include <cassert> #include <cstdio> #include <sstream> -#include <boost/lambda/lambda.hpp> -#include <boost/lambda/bind.hpp> #include <boost/throw_exception.hpp> #include <boost/function_output_iterator.hpp> @@ -438,13 +436,9 @@ ZKFacade::addEphemeralNode(const Path& path) { void ZKFacade::remove(const Path& path) { - namespace ll = boost::lambda; - std::vector< std::string > children = getChildren(path); if (!children.empty()) { - std::for_each(children.begin(), children.end(), - ll::bind(&ZKFacade::remove, this, - ll::ret<Path>(path / ll::_1))); + std::for_each(children.begin(), children.end(), [&](const std::string & s){ remove(path / s); }); } try { @@ -486,12 +480,9 @@ ZKFacade::retainOnly(const Path& path, const std::vector<std::string>& childrenT Children toPreserveSorted(childrenToPreserve); std::sort(toPreserveSorted.begin(), toPreserveSorted.end()); - namespace ll = boost::lambda; std::set_difference(current.begin(), current.end(), toPreserveSorted.begin(), toPreserveSorted.end(), - boost::make_function_output_iterator( - ll::bind(&ZKFacade::remove, this, - ll::ret<Path>(path / ll::_1)))); + boost::make_function_output_iterator([&](const std::string & s){ remove(path / s); })); } std::vector< std::string > |