hello,
Despite some research, I am struggling to combine boost filesystem, boost lambda
and STL for_each.
32 std::string str = "";
33 std::string path = "/tmp";
34 boost::filesystem::directory_iterator it(path);
35 while(it != boost::filesystem::directory_iterator())
36 {
37 str += it->path().filename() + "<br>";
38 ++it;
39 }
works fine
but
40 std::for_each(boost::filesystem::directory_iterator(path),
boost::filesystem::directory_iterator(),
41 str += *boost::lambda::_1.path().parent_path() );
does not compile with the error message that :
error: ‘const struct
boost::lambda::lambda_functor