Boost logo

Boost :

Subject: Re: [boost] [forward_declare] Interest Inquiry toward Faster Compile Times
From: Daniel Larimer (dlarimer_at_[hidden])
Date: 2012-08-02 00:50:26


On Aug 1, 2012, at 11:20 PM, Andrey Semashev <andrey.semashev_at_[hidden]> wrote:

> On Wednesday 01 August 2012 20:36:03 Daniel Larimer wrote:
>>
>> One of the things I realized doing this work was that often the only reason
>> you need to include a header is because the compiler needs to know the SIZE
>> of the type that you wish to forward declare and nothing else. So our
>> development is slowed entirely due to the lack of a SINGLE NUMBER. So I
>> created a utility that allowed me to 'forward declare' the size of the
>> variable. This allowed me to use return by value and member variables via
>> forward declaration WITHOUT having to resort to heap allocation.
>
> This is an interesting idea but you also have to know alignment of the
> forwarded type. Which basically brings us to aligned_storage. I think, a
> simple wrapper around aligned_storage like your fwd could be a useful tool.
>
>
Simply including boost::aligned_storage adds 1600 lines of code to be processed, most of it totally
irrelevant to the task of aligned storage. I would want to implement aligned storage with much less overhead.

The primary goal is to accelerate compile times and including anything from boost::mpl (which alligned_storage does) starts to pile on the code.

Dan

> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


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