Boost logo

Boost :

From: Eric Niebler (eric.niebler_at_[hidden])
Date: 2005-08-26 08:38:05


Stefan Slapeta wrote:
>
> Hi,
>
> http://tinyurl.com/dl8ze
>
> [
> because of:
>
> #ifdef BOOST_FOREACH_NO_CONST_RVALUE_DETECTION
> # error Expected failure : const rvalues disallowed
> #else
> ]
>
> I think it's not quite correct to fail the test case in this situation.
> "Failure" means that some functionality of this library doesn't work
> correctly in this environment, which is obviously not the case because,
> according to the documentation, FOREACH isn't intended to handle const
> rvalues on VC (btw, what, if any, is the intended behaviour on a full
> standard compliant compiler?)
>
> IMO, this test case should do nothing and simply return ok for the
> affected compilers, but others may have a different opinion.
>

The idea was to to give people looking at the test results an accurate
view of the usefulness of FOREACH on a certain compiler. If the
"rvalue_const" test appears to pass for vc7.1, it'll give people a false
sense of security. (Because, as we all know, nobody reads the
documentation.) Once I have marked this failure as expected, which I'm
working on now, all will be right with the world.

On a compliant compiler, this should Just Work; that is, you should be
able to iterate over a const rvalue sequence.

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

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