]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // |
2 | // Copyright Thomas Witt 2003. | |
3 | // Distributed under the Boost Software License, Version 1.0. (See | |
4 | // accompanying file LICENSE_1_0.txt or copy at | |
5 | // http://www.boost.org/LICENSE_1_0.txt) | |
6 | // | |
7 | #include <boost/iterator/iterator_archetypes.hpp> | |
8 | #include <boost/iterator/iterator_categories.hpp> | |
9 | #include <boost/iterator/iterator_concepts.hpp> | |
10 | #include <boost/concept_check.hpp> | |
11 | #include <boost/cstdlib.hpp> | |
12 | ||
13 | int main() | |
14 | { | |
15 | { | |
16 | typedef boost::iterator_archetype< | |
17 | int | |
18 | , boost::iterator_archetypes::readable_iterator_t | |
19 | , boost::random_access_traversal_tag | |
20 | > iter; | |
21 | ||
22 | boost::function_requires< boost_concepts::ReadableIteratorConcept<iter> >(); | |
23 | boost::function_requires< boost_concepts::RandomAccessTraversalConcept<iter> >(); | |
f67539c2 | 24 | } |
7c673cae FG |
25 | { |
26 | typedef boost::iterator_archetype< | |
27 | int | |
28 | , boost::iterator_archetypes::readable_writable_iterator_t | |
29 | , boost::random_access_traversal_tag | |
30 | > iter; | |
31 | ||
32 | boost::function_requires< boost_concepts::ReadableIteratorConcept<iter> >(); | |
33 | boost::function_requires< boost_concepts::WritableIteratorConcept<iter> >(); | |
34 | boost::function_requires< boost_concepts::RandomAccessTraversalConcept<iter> >(); | |
f67539c2 | 35 | } |
7c673cae FG |
36 | { |
37 | typedef boost::iterator_archetype< | |
38 | const int // I don't like adding const to Value. It is redundant. -JGS | |
39 | , boost::iterator_archetypes::readable_lvalue_iterator_t | |
40 | , boost::random_access_traversal_tag | |
41 | > iter; | |
42 | ||
43 | boost::function_requires< boost_concepts::ReadableIteratorConcept<iter> >(); | |
44 | boost::function_requires< boost_concepts::LvalueIteratorConcept<iter> >(); | |
45 | boost::function_requires< boost_concepts::RandomAccessTraversalConcept<iter> >(); | |
f67539c2 | 46 | } |
7c673cae FG |
47 | { |
48 | typedef boost::iterator_archetype< | |
49 | int | |
50 | , boost::iterator_archetypes::writable_lvalue_iterator_t | |
51 | , boost::random_access_traversal_tag | |
52 | > iter; | |
53 | ||
54 | boost::function_requires< boost_concepts::WritableIteratorConcept<iter> >(); | |
55 | boost::function_requires< boost_concepts::LvalueIteratorConcept<iter> >(); | |
56 | boost::function_requires< boost_concepts::RandomAccessTraversalConcept<iter> >(); | |
f67539c2 | 57 | } |
7c673cae FG |
58 | |
59 | return boost::exit_success; | |
60 | } | |
61 |