]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Copyright (C) 2004 Jeremy Siek <jsiek@cs.indiana.edu> |
2 | // Distributed under the Boost Software License, Version 1.0. (See | |
3 | // accompanying file LICENSE_1_0.txt or copy at | |
4 | // http://www.boost.org/LICENSE_1_0.txt) | |
5 | ||
6 | #include <boost/iterator/reverse_iterator.hpp> | |
7 | #include <boost/iterator/iterator_concepts.hpp> | |
8 | #include <boost/concept_check.hpp> | |
9 | #include <boost/cstdlib.hpp> | |
10 | #include <list> | |
11 | ||
12 | int main() | |
13 | { | |
14 | { | |
15 | typedef boost::reverse_iterator<int*> rev_iter; | |
16 | typedef boost::reverse_iterator<int const*> c_rev_iter; | |
17 | ||
18 | boost::function_requires< boost_concepts::WritableIteratorConcept<rev_iter> >(); | |
19 | boost::function_requires< boost_concepts::LvalueIteratorConcept<rev_iter> >(); | |
20 | boost::function_requires< boost_concepts::RandomAccessTraversalConcept<rev_iter> >(); | |
21 | boost::function_requires< boost::RandomAccessIteratorConcept<rev_iter> >(); | |
22 | boost::function_requires< boost_concepts::InteroperableIteratorConcept<rev_iter, c_rev_iter> >(); | |
23 | } | |
24 | ||
25 | // Many compilers' builtin container iterators don't interoperate well, though | |
26 | // STLport fixes that problem. | |
27 | #if defined(__SGI_STL_PORT) \ | |
28 | || !BOOST_WORKAROUND(__GNUC__, <= 2) \ | |
29 | && !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, <= 1)) \ | |
20effc67 | 30 | && !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x551)) \ |
7c673cae FG |
31 | && !BOOST_WORKAROUND(__LIBCOMO_VERSION__, BOOST_TESTED_AT(29)) \ |
32 | && !BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, <= 1) | |
33 | { | |
34 | typedef boost::reverse_iterator<std::list<int>::iterator> rev_iter; | |
35 | typedef boost::reverse_iterator<std::list<int>::const_iterator> c_rev_iter; | |
36 | ||
37 | boost::function_requires< boost_concepts::ReadableIteratorConcept<c_rev_iter> >(); | |
38 | boost::function_requires< boost_concepts::LvalueIteratorConcept<c_rev_iter> >(); | |
39 | boost::function_requires< boost_concepts::BidirectionalTraversalConcept<c_rev_iter> >(); | |
40 | boost::function_requires< boost::BidirectionalIteratorConcept<c_rev_iter> >(); | |
41 | boost::function_requires< boost_concepts::InteroperableIteratorConcept<rev_iter, c_rev_iter> >(); | |
42 | } | |
43 | #endif | |
f67539c2 | 44 | |
7c673cae FG |
45 | return boost::exit_success; |
46 | } |