Boost Users :
Subject: Re: [Boost-users] is leaf() be defined at boost/filesystem/operations.hpp ?
From: Lars Viklund (zao_at_[hidden])
Date: 2011-07-20 09:27:35
On Wed, Jul 20, 2011 at 06:12:14AM -0700, Eric Lin wrote:
> Dear advanced boost/c/g++ programers:
> Â I copied and try a simple (Reading a directory with boost) program , from page 383, Example 10-19, of book(C++ cookbook)
> Example10-19.cpp:34:24: error: âclass boost::filesystem3::directory_entryâ has no member named âleafâ
> I am using 1.46.1 of boost
Note that the error message mentions "filesystem3", which indicate that
you are currently using Boost.Filesystem v3.
The book is probably written against the old Filesystem v2, which was
the default version used up through Boost 1.45.0.
You've got two solutions at hand:
1) Define the preprocessor definition shown in the documentation to get
v2, but that will stop working when Boost stops shipping v2
(according to the docs, this will be after 1.47).
2) Rewrite the code to use the slightly different interface of v3.
-- Lars Viklund | zao_at_[hidden]
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