Boost logo

Boost :

Subject: Re: [boost] [config] request for BOOST_NO_FWD_STD_DECLARATION
From: Daniel James (dnljms_at_[hidden])
Date: 2011-02-16 09:52:18


On 16 February 2011 14:41, Stewart, Robert <Robert.Stewart_at_[hidden]> wrote:
> Christian Holmquist wrote:
>>
>> Can't this be taken one step further, and introduce something
>> like boost/details/stdfwd.hpp, or maybe boost/stdfwd.hpp?  In
>> the case where forwarding is not possible, stdfwd.hpp would
>> have to include all std::containers
>
> In the fallback case, you'd force inclusion of <map>, <multimap>, <set>, etc. for some context that, otherwise, would only have included, say, <vector>.  That's not a good tradeoff.  Instead of stdfwd.hpp, it'll have to be map_fwd.hpp, multimap_fwd.hpp, and so on.

We've already got such a thing, it's called
'boost/detail/container_fwd.hpp'. It deals with all the containers
because it was originally written for the hash library, which needs
them all. But IMO If you just want a single container, you might as
well just include the header. They're not that expensive.

Daniel


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