Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost Concepts with iterators and ranges
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-03-04 15:55:35


At Sun, 20 Feb 2011 23:07:08 -0800,
Robert Ramey wrote:
>
> I've been experimenting with Boost Concepts in conjunction with Boost Range
> and by implication
> boost iterators. I have a few questions from the documentation:
>
> a) I see BOOST_CONCEPT_USAGE described in some detail in the section
> Creating Concept Checking Classes. But in the section titled
> "Reference" I only find in the subsection "macros"
> BOOST_CONCEPT_ASSERT and BOOST_CONCEPT_REQUIRES. Is
> BOOST_CONCEPT_USAGE meant to be used?

Yes. Use as directed in the "Creating" section. Please enter a trac
ticket for the missing reference section.

> b) "Deprecated Concept Checking Classes"
>
> "For each of the concepts documented here, the library includes an identical
> concept checking class whose name ends in "Concept" For example, in addition
> to RandomAccessIterator, the library defines a RandomAccessIteratorConcept
> class template."
>
> It sounds like this means that I shouldn't expect to find
> "WritableIteratorConcept" but in fact in "interator_concepts.hpp" find just
> that. I'm assuming that's an oversight.

There are all kinds of extra definitions in namespace Boost; unless
documented they are not part of the public interface of the library.
I believe that is the intention here.

> c) except for the above, the Range library uses things like
> ForwardTraversal and ForwardTraversalConcept
> the iterators library uses ForwardTraversal only.

I don't know what to tell you about the Range library, sorry. Not my dept.

> d) the iterators concepts are in the root namespace boost_concepts while the
> range concepts are in the root namespace boost.

Ditto

> e) boost/range/concepts.hpp includes the file
> boost/iterator/iterator_concepts.hpp

What's the problem with that?

> All this makes it very hard to keep all this straight in one's
> head. Is there any possibility that all this could be made simpler
> to follow by some combination of documentation improvements and/or
> namespace coordination?

If improved consistency would help, unless there's a good reason to do
otherwise, Boost.Range should follow the precedent set by
Boost.ConceptCheck. As for doc improvements, I'm open to concrete
suggestions, but don't have any ideas off the top of my head other
than adding the missing reference section.

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

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