-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathiterator_archetype_cc.cpp
More file actions
61 lines (54 loc) · 2.08 KB
/
Copy pathiterator_archetype_cc.cpp
File metadata and controls
61 lines (54 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//
// Copyright Thomas Witt 2003.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/iterator/iterator_archetypes.hpp>
#include <boost/iterator/iterator_categories.hpp>
#include <boost/iterator/iterator_concepts.hpp>
#include <boost/concept_check.hpp>
#include <boost/cstdlib.hpp>
int main()
{
{
typedef boost::iterator_archetype<
int
, boost::iterator_archetypes::readable_iterator_t
, boost::random_access_traversal_tag
> iter;
boost::function_requires< boost_concepts::ReadableIteratorConcept<iter> >();
boost::function_requires< boost_concepts::RandomAccessTraversalConcept<iter> >();
}
{
typedef boost::iterator_archetype<
int
, boost::iterator_archetypes::readable_writable_iterator_t
, boost::random_access_traversal_tag
> iter;
boost::function_requires< boost_concepts::ReadableIteratorConcept<iter> >();
boost::function_requires< boost_concepts::WritableIteratorConcept<iter> >();
boost::function_requires< boost_concepts::RandomAccessTraversalConcept<iter> >();
}
{
typedef boost::iterator_archetype<
const int // I don't like adding const to Value. It is redundant. -JGS
, boost::iterator_archetypes::readable_lvalue_iterator_t
, boost::random_access_traversal_tag
> iter;
boost::function_requires< boost_concepts::ReadableIteratorConcept<iter> >();
boost::function_requires< boost_concepts::LvalueIteratorConcept<iter> >();
boost::function_requires< boost_concepts::RandomAccessTraversalConcept<iter> >();
}
{
typedef boost::iterator_archetype<
int
, boost::iterator_archetypes::writable_lvalue_iterator_t
, boost::random_access_traversal_tag
> iter;
boost::function_requires< boost_concepts::WritableIteratorConcept<iter> >();
boost::function_requires< boost_concepts::LvalueIteratorConcept<iter> >();
boost::function_requires< boost_concepts::RandomAccessTraversalConcept<iter> >();
}
return boost::exit_success;
}