Skip to content

Commit

Permalink
Use using to keep the nicety of boost::lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
omidaladini committed May 23, 2013
1 parent 05b9c6f commit fb17d04
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion barn-agent/src/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ int count_missing(std::vector<std::string> small, std::vector<std::string> big);

template<typename T>
std::vector<T> larger_than_gap(const std::vector<T> A, const std::vector<T> B) {
using boost::lambda::_1;

std::vector<T> C;

set_difference(A.begin(), A.end(), B.begin(), B.end()
Expand All @@ -31,7 +33,7 @@ std::vector<T> larger_than_gap(const std::vector<T> A, const std::vector<T> B) {
std::vector<T> D(B);

if(!C.empty())
D.erase(remove_if(D.begin(), D.end(), boost::lambda::_1 <= C.back())
D.erase(remove_if(D.begin(), D.end(), _1 <= C.back())
, D.end());

return D;
Expand Down

0 comments on commit fb17d04

Please sign in to comment.