Boost logo

Boost Users :

From: Scott Finley (sfinley_at_[hidden])
Date: 2008-08-15 12:57:06


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 <boost/filesystem.hpp>

 

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::basic_path<s
td::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?

 

Scott Finley



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net