diff --git a/doc/headers.html b/doc/headers.html index 6e3b77e..f8b12a3 100755 --- a/doc/headers.html +++ b/doc/headers.html @@ -141,6 +141,11 @@ sub_range - + + <boost/range/concepts.hpp> + concept checks + - +
vc6 and vc7.

+

+ The concept checks and their documentation was provided by Daniel Walker. +


- (C) Copyright Thorsten Ottosen 2003-2005 + (C) Copyright Thorsten Ottosen 2003-2006


diff --git a/doc/range.html b/doc/range.html index 13b5ad4..03a773d 100755 --- a/doc/range.html +++ b/doc/range.html @@ -36,6 +36,8 @@ Bidirectional Range
  • Random Access Range +
  • + Concept Checking @@ -450,6 +452,59 @@ href="../../iterator/doc/new-iter-concepts.html#random-access-traversal-iterator
    +

    Concept Checking

    + + Each of the range concepts has a corresponding concept checking + class in the file boost/range/concepts.hpp. These classes may be + used in conjunction with the
    Boost Concept + Check library to insure that the type of a template parameter + is compatible with a range concept. If not, a meaningful compile + time error is generated. Checks are provided for the range + concepts related to iterator traversal categories. For example, + the following line checks that the type T models the + ForwardRange concept. + +
    +    function_requires<ForwardRangeConcept<T> >();
    +    
    + + An additional concept check is required for the value access + property of the range based on the range's iterator type. For + example to check for a ForwardReadableRange, the following code is + required. + +
    +    function_requires<ForwardRangeConcept<T> >();
    +    function_requires<
    +        ReadableIteratorConcept<
    +            typename range_iterator<T>::type
    +        >
    +    >();
    +    
    + + The following range concept checking classes are provided. + + +

    See also

    +

    Range Terminology and style guidelines

    +

    Iterator Concepts

    +

    Boost Concept Check library

    + +