
I just upgraded from Boost 1.33.1 to 1.37.0 and have found a breaking change in Boost.Range. Previously, iterator_range::empty() would do the following: bool empty() const { if( singular ) return true; return m_Begin == m_End; } and similarly for size(). In the new release, instead of the test, there is an assertion, which is now breaking my code. Why (and when?) was this change introduced? This make Boost Range much in generic code, such as template<class Range> void foo(const Range & r_) { if (r_.empty()) {...} } The code is frequently called with containers and ranges and works beautifully. However, a common pattern is to call the function with a default constructed (empty range). This now crashes. The only way to test for validity AFAICS is to call is_singular(), unfortunately, this breaks when the function is called with containers. This, IMHO, was an unfortunate decision. Any suggestions anyone? Thanks, Tom