I am on ubuntu 8.04. When upgrading from 1.34.1 to 1.36 the following
code breaks.
bfs_test.cpp:
#include <iostream>
#include
using std::cout;
using std::endl;
namespace bfs = boost::filesystem;
int main()
{
bfs::recursive_directory_iterator end_itr;
for( bfs::recursive_directory_iterator itr( "." ); itr != end_itr;
++itr )
{
cout << bfs::extension( itr->leaf() ) << endl;
}
return 0;
}
I compile for 1.34.1 like this:
gcc -o bfs bfs_test.cpp -lstdc++ -lboost_filesystem-gcc41-mt-1_34_1
running the result prints all file extensions recursively as expected.
After switching to 1.36 compiling like this:
gcc -o bfs bfs_test.cpp -lstdc++ -lboost_filesystem-gcc42-mt-1_36
gives the following error:
bfs_test.cpp: In function 'int main()':
bfs_test.cpp:13: error: 'class
boost::filesystem::basic_directory_entry,
boost::filesystem::path_traits> >' has no member named 'leaf'
My mistake, or did something change/break?
Scott Finley