Boost logo

Boost :

Subject: Re: [boost] Lighweight header-only version of Boost.Filesystem?
From: Matthew Chambers (matt.chambers42_at_[hidden])
Date: 2011-08-19 11:04:24


On 8/19/2011 9:41 AM, Mathias Gaunard wrote:
> On 17/08/2011 14:56, Mathias Gaunard wrote:
>> I use Boost.Filesystem in a C++ "script": I use C++ instead of Python or
>> shell script in order to be portable across operating systems.
>>
>> That script is used in bootstrapping the build system of my C++ project,
>> and people have complained that they need to build boost.filesystem just
>> to be able to bootstrap the project.
>
> For information, I ended up writing my own abstraction over the filesystem system functions.
>
> I still think it would be useful to have a minimal header-only part in boost.filesystem itself though.

Do you mean you made your own abstraction over the OS functions? What is the difference in size?
Have you considered runtime-link=shared? And how is Python not portable across operating systems? :)

The problem with a "minimal" subset is defining what "minimal" is. I don't know what causes the code
"bloat" in boost::filesystem, but I suspect it's the template code which makes it relatively easy to
deal with wide character paths the same way as narrow paths.

Is there a way to profile code size to figure out what functions and classes are creating the most
object code?

-Matt


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk