[ANN] BOOST_FOREACH committed to main CVS

BOOST_FOREACH was accepted back in May, but the tree was frozen for release. Now that 1.33 is out and the dust is settling, I finally checked it in. It's in boost/foreach.hpp. BTW, is there a guide for adding new libraries to Boost main CVS? I think I got all the bases covered as far as integration with the main docs and the regression test, but I'd like to be sure. -- Eric Niebler Boost Consulting www.boost-consulting.com

Eric Niebler wrote:
BTW, is there a guide for adding new libraries to Boost main CVS? I think I got all the bases covered as far as integration with the main docs and the regression test, but I'd like to be sure.
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. Cheers, Stefan

Stefan Slapeta wrote:
Hi,
[ 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

Stefan Slapeta <stefan@slapeta.com> writes:
Eric Niebler wrote:
BTW, is there a guide for adding new libraries to Boost main CVS? I think I got all the bases covered as far as integration with the main docs and the regression test, but I'd like to be sure.
Hi,
[ 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.
IMO if the test is going to pass, it should test *something*. For example, the parameter library SFINAE tests pass where SFINAE isn't supported in order to prove that if you use the SFINAE syntax, your code will still compile and work on that compiler with reduced functionality. Technically, though, we should have a separate sfinae_syntax test for that, I think. So I guess I agree with what Eric did. -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (3)
-
David Abrahams
-
Eric Niebler
-
Stefan Slapeta