Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/concept_check/reference.htm @ 33

Last change on this file since 33 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 10.9 KB
Line 
1<HTML>
2<!--
3  -- Copyright (c) Jeremy Siek and Andrew Lumsdaine 2000
4  --
5  -- Permission to use, copy, modify, distribute and sell this software
6  -- and its documentation for any purpose is hereby granted without fee,
7  -- provided that the above copyright notice appears in all copies and
8  -- that both that copyright notice and this permission notice appear
9  -- in supporting documentation.  We make no
10  -- representations about the suitability of this software for any
11  -- purpose.  It is provided "as is" without express or implied warranty.
12  -->
13<Head>
14<Title>Boost Concept Checking Reference</Title>
15</Head>
16<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" 
17        ALINK="#ff0000"> 
18<IMG SRC="../../boost.png" 
19     ALT="C++ Boost" width="277" height="86"> 
20
21<BR Clear>
22
23<h2><a name="reference">Reference</a></h2>
24
25  <OL>
26  <LI><a href="#functions">Functions</a></LI>
27  <LI><a href="#macros">Macros</a></LI>
28  <LI><a href="#basic-concepts">Basic Concept Checking Classes</a></LI>
29  <LI><a href="#iterator-concepts">Iterator Concept Checking Classes</a></LI>
30  <LI><a href="#function-object-concepts">Function Object Concept Checking Classes</a></LI>
31  <LI><a href="#container-concepts">Container Concept Checking Classes</a></LI>
32  <LI><a href="#basic-archetype">Basic Archetype Classes</a></LI>
33  <LI><a href="#iterator-archetype">Iterator Archetype Classes</a></LI>
34  <LI><a href="#function-object-archetype">Function Object Archetype Classes</a></LI>
35  <LI><a href="#container-archetype">Container Archetype Classes</a></LI>
36  </OL>
37
38<h3><a name="functions">Functions</a></h3>
39
40<pre>
41  template &lt;class Concept&gt;
42  void function_requires();
43</pre>
44
45<h3><a name="macros">Macros</a></h3>
46
47<pre>
48  // Apply concept checks in class definitions.
49  BOOST_CLASS_REQUIRE(<i>type</i>, <i>namespace-of-concept</i>, <i>concept</i>);
50  BOOST_CLASS_REQUIRE2(<i>type1</i>, <i>type2</i>, <i>namespace-of-concept</i>, <i>concept</i>);
51  BOOST_CLASS_REQUIRE3(<i>type1</i>, <i>type2</i>, <i>type3</i>, <i>namespace-of-concept</i>, <i>concept</i>);
52  BOOST_CLASS_REQUIRE4(<i>type1</i>, <i>type2</i>, <i>type3</i>, <i>type4</i>, <i>namespace-of-concept</i>, <i>concept</i>);
53</pre>
54
55Deprecated macros:
56
57<pre>
58  // Apply concept checks in class definitions.
59  BOOST_CLASS_REQUIRES(<i>type</i>, <i>concept</i>);
60  BOOST_CLASS_REQUIRES2(<i>type1</i>, <i>type2</i>, <i>concept</i>);
61  BOOST_CLASS_REQUIRES3(<i>type1</i>, <i>type2</i>, <i>type3</i>, <i>concept</i>);
62  BOOST_CLASS_REQUIRES4(<i>type1</i>, <i>type2</i>, <i>type3</i>, <i>type4</i>, <i>concept</i>);
63</pre>
64
65<h3><a name="basic-concepts">Basic Concept Checking Classes</a></h3>
66
67<pre>
68  template &lt;class T&gt;
69  struct IntegerConcept; // Is T a built-in integer type?
70
71  template &lt;class T&gt;
72  struct SignedIntegerConcept; // Is T a built-in signed integer type?
73
74  template &lt;class T&gt;
75  struct UnsignedIntegerConcept; // Is T a built-in unsigned integer type?
76
77  template &lt;class X, class Y&gt;
78  struct ConvertibleConcept; // Is X convertible to Y?
79
80  template &lt;class T&gt;
81  struct <a href="../utility/Assignable.html">Assignable</a>Concept; // Standard ref 23.1
82
83  template &lt;class T&gt;
84  struct SGI<a href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>Concept;
85
86  template &lt;class T&gt;
87  struct <a
88  href="http://www.sgi.com/tech/stl/DefaultConstructible.html">DefaultConstructible</a>Concept;
89
90  template &lt;class T&gt; 
91  struct <a href="../utility/CopyConstructible.html">CopyConstructible</a>Concept; // Standard ref 20.1.3
92
93  template &lt;class T&gt; 
94  struct <a href="http://www.sgi.com/tech/stl/EqualityComparable.html">EqualityComparable</a>Concept; // Standard ref 20.1.1
95
96  template &lt;class T&gt;
97  struct <a href="../utility/LessThanComparable.html">LessThanComparable</a>Concept; // Standard ref 20.1.2
98
99  template &lt;class T&gt;
100  struct ComparableConcept; // The SGI STL <a href="http://www.sgi.com/tech/stl/LessThanComparable.html">LessThanComparable</a> concept
101</pre>
102
103<h3><a name="iterator-concepts">Iterator Concept Checking Classes</a></h3>
104
105<pre>
106  template &lt;class Iter&gt;
107  struct <a href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>Concept; // Standard ref 24.1.1 Table 72
108
109  template &lt;class Iter, class T&gt; 
110  struct <a href="http://www.sgi.com/tech/stl/OutputIterator.html">OutputIterator</a>Concept; // Standard ref 24.1.2 Table 73
111
112  template &lt;class Iter&gt; 
113  struct <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>Concept; // Standard ref 24.1.3 Table 74
114
115  template &lt;class Iter&gt; 
116  struct Mutable_ForwardIteratorConcept;
117
118  template &lt;class Iter&gt; 
119  struct <a href="http://www.sgi.com/tech/stl/BidirectionalIterator.html">BidirectionalIterator</a>Concept; // Standard ref 24.1.4 Table 75
120
121  template &lt;class Iter&gt; 
122  struct Mutable_BidirectionalIteratorConcept;
123
124  template &lt;class Iter&gt; 
125  struct <a href="http://www.sgi.com/tech/stl/RandomAccessIterator.html">RandomAccessIterator</a>Concept; // Standard ref 24.1.5 Table 76
126
127  template &lt;class Iter&gt; 
128  struct Mutable_RandomAccessIteratorConcept;
129</pre>
130
131<h3><a name="function-object-concepts">Function Object Concept Checking Classes</a></h3>
132
133<pre>
134  template &lt;class Func, class Return&gt;
135  struct <a href="http://www.sgi.com/tech/stl/Generator.html">Generator</a>Concept;
136
137  template &lt;class Func, class Return, class Arg&gt;
138  struct <a href="http://www.sgi.com/tech/stl/UnaryFunction.html">UnaryFunction</a>Concept;
139
140  template &lt;class Func, class Return, class First, class Second&gt;
141  struct <a href="http://www.sgi.com/tech/stl/BinaryFunction.html">BinaryFunction</a>Concept;
142
143  template &lt;class Func, class Arg&gt;
144  struct Unary<a href="http://www.sgi.com/tech/stl/Predicate.html">Predicate</a>Concept;
145
146  template &lt;class Func, class First, class Second&gt;
147  struct <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">BinaryPredicate</a>Concept;
148
149  template &lt;class Func, class First, class Second&gt;
150  struct Const_BinaryPredicateConcept;
151
152  template &lt;class Func, class Return&gt;
153  struct <a href="http://www.sgi.com/tech/stl/AdaptableGenerator.html">AdaptableGenerator</a>Concept;
154
155  template &lt;class Func, class Return, class Arg&gt;
156  struct <a href="http://www.sgi.com/tech/stl/AdaptableUnaryFunction.html">AdaptableUnaryFunction</a>Concept;
157
158  template &lt;class Func, class First, class Second&gt;
159  struct <a href="http://www.sgi.com/tech/stl/AdaptableBinaryFunction.html">AdaptableBinaryFunction</a>Concept;
160
161  template &lt;class Func, class Arg&gt;
162  struct <a href="http://www.sgi.com/tech/stl/AdaptablePredicate.html">AdaptablePredicate</a>Concept;
163
164  template &lt;class Func, class First, class Second&gt;
165  struct <a href="http://www.sgi.com/tech/stl/AdaptableBinaryPredicate.html">AdaptableBinaryPredicate</a>Concept;
166 
167</pre>
168
169<h3><a name="container-concepts">Container Concept Checking Classes</a></h3>
170
171<pre>
172  template &lt;class C&gt;
173  struct <a href="http://www.sgi.com/tech/stl/Container.html">Container</a>Concept; // Standard ref 23.1 Table 65
174
175  template &lt;class C&gt;
176  struct Mutable_ContainerConcept;
177
178  template &lt;class C&gt;
179  struct <a href="http://www.sgi.com/tech/stl/ForwardContainer.html">ForwardContainer</a>Concept;
180
181  template &lt;class C&gt;
182  struct Mutable_ForwardContainerConcept;
183
184  template &lt;class C&gt;
185  struct <a href="http://www.sgi.com/tech/stl/ReversibleContainer.html">ReversibleContainer</a>Concept; // Standard ref 23.1 Table 66
186
187  template &lt;class C&gt;
188  struct Mutable_ReversibleContainerConcept;
189
190  template &lt;class C&gt;
191  struct <a href="http://www.sgi.com/tech/stl/RandomAccessContainer.html">RandomAccessContainer</a>Concept;
192
193  template &lt;class C&gt;
194  struct Mutable_RandomAccessContainerConcept;
195
196  template &lt;class C&gt;
197  struct <a href="http://www.sgi.com/tech/stl/Sequence.html">Sequence</a>Concept; // Standard ref 23.1.1
198
199  template &lt;class C&gt;
200  struct <a href="http://www.sgi.com/tech/stl/FrontInsertionSequence.html">FrontInsertionSequence</a>Concept;
201
202  template &lt;class C&gt;
203  struct <a href="http://www.sgi.com/tech/stl/BackInsertionSequence.html">BackInsertionSequence</a>Concept;
204
205  template &lt;class C&gt;
206  struct <a href="http://www.sgi.com/tech/stl/AssociativeContainer.html">AssociativeContainer</a>Concept; // Standard ref 23.1.2 Table 69
207
208  template &lt;class C&gt;
209  struct <a href="http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html">UniqueAssociativeContainer</a>Concept;
210
211  template &lt;class C&gt;
212  struct <a href="http://www.sgi.com/tech/stl/MultipleAssociativeContainer.html">MultipleAssociativeContainer</a>Concept;
213
214  template &lt;class C&gt;
215  struct <a href="http://www.sgi.com/tech/stl/SimpleAssociativeContainer.html">SimpleAssociativeContainer</a>Concept;
216
217  template &lt;class C&gt;
218  struct <a href="http://www.sgi.com/tech/stl/PairAssociativeContainer.html">PairAssociativeContainer</a>Concept;
219
220  template &lt;class C&gt;
221  struct <a href="http://www.sgi.com/tech/stl/SortedAssociativeContainer.html">SortedAssociativeContainer</a>Concept;
222</pre>
223
224
225<h3><a name="basic-archetype">Basic Archetype Classes</a></h3>
226
227<pre>
228  template &lt;class T = int&gt;
229  class null_archetype; // A type that models no concepts.
230
231  template &lt;class Base = null_archetype&gt;
232  class default_constructible_archetype;
233
234  template &lt;class Base = null_archetype&gt;
235  class assignable_archetype;
236
237  template &lt;class Base = null_archetype&gt;
238  class copy_constructible_archetype;
239
240  template &lt;class Base = null_archetype&gt;
241  class equality_comparable_archetype;
242
243  template &lt;class T, class Base = null_archetype&gt;
244  class convertible_to_archetype;
245</pre>
246
247<h3><a name="iterator-archetype">Iterator Archetype Classes</a></h3>
248
249<pre>
250  template &lt;class ValueType&gt;
251  class trivial_iterator_archetype;
252
253  template &lt;class ValueType&gt;
254  class mutable_trivial_iterator_archetype;
255
256  template &lt;class ValueType&gt;
257  class input_iterator_archetype;
258
259  template &lt;class ValueType&gt;
260  class forward_iterator_archetype;
261
262  template &lt;class ValueType&gt;
263  class bidirectional_iterator_archetype;
264
265  template &lt;class ValueType&gt;
266  class random_access_iterator_archetype;
267
268</pre>
269
270<h3><a name="function-object-archetype">Function Object Archetype Classes</a></h3>
271
272<pre>
273  template &lt;class Arg, class Return&gt;
274  class unary_function_archetype;
275
276  template &lt;class Arg1, class Arg2, class Return&gt;
277  class binary_function_archetype;
278
279  template &lt;class Arg&gt;
280  class predicate_archetype;
281
282  template &lt;class Arg1, class Arg2&gt;
283  class binary_predicate_archetype;
284</pre>
285
286<h3><a name="container-archetype">Container Archetype Classes</a></h3>
287
288<pre>
289UNDER CONSTRUCTION
290</pre>
291
292<p>
293<a href="./concept_check.htm">Back to Introduction</a>
294<br>
295<a href="./implementation.htm">Prev: Implementation</a>
296
297<br>
298<HR>
299<TABLE>
300<TR valign=top>
301<TD nowrap>Copyright &copy 2000</TD><TD>
302<A HREF="../../people/jeremy_siek.htm">Jeremy Siek</A>(<A
303HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
304Andrew Lumsdaine</A>(<A HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
305</TD></TR></TABLE>
306
307</BODY>
308</HTML> 
Note: See TracBrowser for help on using the repository browser.