forked from boostorg/concept_check
added the Adaptable functor concepts
also updated the SGI STL URL's [SVN r11963]
This commit is contained in:
1 parent
64b2171140
commit
f0d2603a67
6 files changed
+64
-48
No files matched your search
@@ -24,7 +24,7 @@
|
||||
|
||||
As an example of how to create a concept checking class, we look
|
||||
at how to create the corresponding checks for the
|
||||
<a href="http://www.sgi.com/Technology/STL/RandomAccessIterator.html">
|
||||
<a href="http://www.sgi.com/tech/stl/RandomAccessIterator.html">
|
||||
RandomAccessIterator</a> concept. First, as a convention we name the
|
||||
concept checking class after the concept, and add the suffix
|
||||
``<tt>Concept</tt>''. Next we must define a member function named
|
||||
@@ -36,11 +36,11 @@ non-const member function with no parameters.
|
||||
<p>
|
||||
The first part of the <tt>constraints()</tt> function includes
|
||||
the requirements that correspond to the <i>refinement</i> relationship
|
||||
between <a href="http://www.sgi.com/Technology/STL/RandomAccessIterator.html">
|
||||
between <a href="http://www.sgi.com/tech/stl/RandomAccessIterator.html">
|
||||
RandomAccessIterator</a> and the concepts which it builds upon:
|
||||
<a href="http://www.sgi.com/Technology/STL/BidirectionalIterator.html">
|
||||
<a href="http://www.sgi.com/tech/stl/BidirectionalIterator.html">
|
||||
BidirectionalIterator</a> and
|
||||
<a href="http://www.sgi.com/Technology/STL/LessThanComparable.html">
|
||||
<a href="http://www.sgi.com/tech/stl/LessThanComparable.html">
|
||||
LessThanComparable</a>. We could have instead used
|
||||
<tt>BOOST_CLASS_REQUIRES</tt> and placed these requirements in the class
|
||||
body, however <tt>BOOST_CLASS_REQUIRES</tt> uses C++ language features that
|
||||
@@ -51,7 +51,7 @@ Next we check that the <tt>iterator_category</tt> of the iterator is
|
||||
either <tt>std::random_access_iterator_tag</tt> or a derived class.
|
||||
After that we write out some code that corresponds to the valid
|
||||
expressions of the <a
|
||||
href="http://www.sgi.com/Technology/STL/RandomAccessIterator.html">
|
||||
href="http://www.sgi.com/tech/stl/RandomAccessIterator.html">
|
||||
RandomAccessIterator</a> concept. Typedefs can also be added to
|
||||
enforce the associated types of the concept.
|
||||
|
||||
|
||||
Reference in new issue
Block a user