|
Boost : |
Subject: Re: [boost] Lighweight header-only version of Boost.Filesystem?
From: Cory Nelson (phrosty_at_[hidden])
Date: 2011-08-20 18:28:28
On Sat, Aug 20, 2011 at 6:38 AM, Beman Dawes <bdawes_at_[hidden]> wrote:
> On Wed, Aug 17, 2011 at 8:56 AM, Mathias Gaunard <
> mathias.gaunard_at_[hidden]> wrote:
>
>> I.....>Therefore, I would really like it if there was a lightweight
>> header-only version of Boost.Filesystem.
>> I don't need the full extent of features; I just need to have the ability
>> to do the following portably:
>> Â - read all files of a directory
>> Â - create directories
>> Â - remove files and directories
>> Â - rename files and directories
>>
>> The first point being the most important.
>>
>
> A header-only version would be a nice feature to offer.
>
> But it may be more time consuming to implement than it would appear. Vicente
> Botet tried to do the same with Boost.System, and ran into problems.
>
> It seems to me that there should be some general recipe to create
> header-only libraries with identical functionality to the compiled library
> version. Has anyone figured out what that recipe is?
Here's something easy: new includes that have the implementation.
Library authors don't need to worry about ODR issues -- let the user
include it in only a single source file. I.e. my project would have a
boost.cpp that consists of:
#include <boost/filesystem.cpp>
#include <boost/system.cpp>
etc.
-- Cory Nelson http://int64.org
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk