From: shunsuke (pstade.mb_at_[hidden])
Date: 2007-10-12 14:02:40
Markus Schöpflin wrote:
>> Here is a patch.
> This patch might fix this particular failure, but I don't think it
> should be applied, as it only masks the real problem.
> The failure comes from the fact, that range currently is not able to
> correctly handle char types. For example:
> str = "hello world"
> rr = make_iterator_range( str.begin(), str.begin() + 5 );
> BOOST_CHECK( rr == "hello" );
> This fails because rr (length 5) is compared to a char array (length 6),
> as the terminating null character is not correctly handled.
See "Warning" in http://www.boost.org/libs/range/doc/intro.html
In Boost1.34(or below), "hello" and (char const *)"hello" is a range whose size is 5.
In Boost1.35, "hello" is a range whose size is 6, containing the trailing null. And
(char const *)"hello" is no longer a range.
Boost1.34(or below) behavior was rejected, because it was different from
other array types behavior.
BTW, see ticket: http://svn.boost.org/trac/boost/ticket/1309
This is more important for msvc-7.1 users.
If these two patches applied, I think all the regressions will pass.
-- Shunsuke Sogame