
On Fri, Aug 15, 2008 at 12:57, Scott Finley <sfinley@tomotherapy.com> wrote:
bfs_test.cpp: In function 'int main()':
bfs_test.cpp:13: error: 'class boost::filesystem::basic_directory_entry<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >' has no member named 'leaf'
My mistake, or did something change/break?
It looks like you now need itr->path().leaf() or boost::implicit_cast<bfs::path const &>(*itr).leaf() ( http://beta.boost.org/doc/libs/1_36_0/libs/filesystem/doc/reference.html#Cla... ) As I recall, this change was part of optimization efforts to make iterating faster by caching the file_status. Also, it was decided that some of the names for path decomposition functions were confusing, particularly branch and leaf, so they were changed. The new path decomposition table suggests that you should now be using filename() instead of leaf(): http://beta.boost.org/doc/libs/1_36_0/libs/filesystem/doc/reference.html#Pat... (But it's likely backwards-compatible, so you shouldn't need to.) HTH, ~ Scott