Boost logo

Boost Users :

Subject: Re: [Boost-users] [range] questions about documentation and usage
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2012-11-04 21:30:55


> I believe a concept definition describes those valid expressions
> which necessary and SUFFICIENT to define the concept.
> That is, I think we'll agree that any type which models the
> concept should support all the valid expressions list. I belive
> also that any type which supports all the valid expressions
> listed is necessarily a model of the concept.

I agree with this. The problem is that you are equating "supporting
all the valid expressions" with "implementing the functions that
appear in the valid expressions yourself". Implementing the functions
that appear in the valid expressions is *one* conceivable way a
library can allow supporting all the valid expressions, but it's
not the only way. Boost.Range provides a different mechanism to
support the valid expressions: they implement the function that
appears in the valid expression (boost::begin()) themselves, and
you implement a helper function that this function calls
(range_begin() or .begin()). I don't see anything wrong with that.

Regards,
Nate
                                               


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