Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2005-05-02 14:28:55


>>>This would effectively double the amount of code in foreach.hpp, and
>>
>> I do not think that's true. Essentially you only need an alternative
>> implementation for begin and end.
>
> True. But there are 2 implementations for begin/end already to deal with
> compilers that can't handle const rvalues. Seems that
> Boost.Range-independence axis is orthogonal to the const-rvalue axis, so I
> would need 4 variants each of begin and end. Yuk.

I don't think having stl only containers with rvalues support is necessary.
After all you want simplest version - you get it.

Gennadiy

P.S. as for compilation time overhead, it's difficult to get any reliable
quantative data. It depends on too many factors including the complexity of
the code by itself, compiler, debug/release mode and how heavy FOREACH is
used.


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