Boost logo

Boost :

Subject: Re: [boost] [Boost-users] Maintenace Guidelines wiki page
From: David Abrahams (dave_at_[hidden])
Date: 2008-11-25 23:23:10


on Tue Nov 25 2008, "Daniel Walker" <daniel.j.walker-AT-gmail.com> wrote:

> More over, the current state of the Range concepts is indefensible. At
> least, no one has offered a defense. More specifically, no one has
> offered a response to the question of what problem is solved or what
> benefit is gained by removing empty(r) from the concept definitions. I
> gave a lengthy argument last night as to the benefits of empty(r). No
> one has countered it. Why should they? Emptiness or non-emptiness are
> natural, obvious attributes of a range. Why shouldn't a range
> abstraction such as a generic concept include a method for querying
> emptiness? It only makes sense.

I don't know what the motivation was, but there's one obvious
possibility: if the concept requires boost::begin(r) and boost::end(r),
you can write a generic boost::empty(r) function that uses begin and end
without putting empty in the concept requirements.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk