Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost range changes [1.37.0]
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-11-19 17:26:29


AMDG

Tomas Puverle wrote:
> 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()) {...}
> }
>

template<class T>
bool is_singular_or_empty(const T& t) { return(t.empty()); }

template<class T>
bool is_singular_or_empty(const iterator_range<T>& t) {
return(t.is_singular() || t._empty()); }

?

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net