boost::filesystem::recursive_directory_iterator end, begin(directory);
auto num_of_files=std::count_if(begin, end,
std::not1(boost::filesystem::is_directory)));
I am trying to negate the function is_directory on the above directory iterator but am hitting a brick wall. I have tried specifying the template for not1
as bool(*)(const boost::filesystem::path&)
and tried static casting the function both without success.
I know I can resort to a lamdba but this is cleaner if it works.
Thanks