
Dave Handley skrev:
<snip>
IMHO, this is obfuscated. There is a difference between an empty range and a range which is optional.
An there is a difference betweeen an empty range and a singular range.
If there is a genuine difference between an empty range and a singular range, why is the functionality so different between debug and release?
In debug mdoe we detect misused of singular ranges.
Unfortunately, different functionality between debug and release is almost always a bad thing. You are no longer testing the same code in both cases, and in this case the library will silently fail in release which would be a disaster in production. I'm going to have to side with both Tom and Rob on this thread and say that this is a severe retrograde step. From the perspective of a generic programmer, this change turns boost.range from being a really useful library, into it being close to unusable. Please reconsider the change. I just can't agree with any of the reasons for doing it - testing a bool in the empty or size functions will have no noticeable difference to performance in any real world application. Dave