mirror of
https://github.com/boostorg/iterator.git
synced 2026-01-22 17:22:45 +00:00
Compare commits
214 Commits
boost-1.31
...
svn-tags/m
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6926e1782 | ||
|
|
0c3a68530e | ||
|
|
d3daa47561 | ||
|
|
62c993978a | ||
|
|
74f41dcb5b | ||
|
|
c8d1461340 | ||
|
|
13dcd5590f | ||
|
|
7f125cacb9 | ||
|
|
8cf04e1c7b | ||
|
|
0122a0c8ec | ||
|
|
09549783cc | ||
|
|
273c1d784c | ||
|
|
a99ab81803 | ||
|
|
0cb4ce54ef | ||
|
|
0670e05297 | ||
|
|
b353d45f2d | ||
|
|
19d339c916 | ||
|
|
506517191c | ||
|
|
b502873f00 | ||
|
|
b838d27aa3 | ||
|
|
17c373ded3 | ||
|
|
09e1cb9a38 | ||
|
|
58288cfb48 | ||
|
|
cd730895ca | ||
|
|
2d2a84f8c4 | ||
|
|
4871736269 | ||
|
|
fec82e2de8 | ||
|
|
a5b14e1a4f | ||
|
|
8480d452a9 | ||
|
|
5f870d780d | ||
|
|
010f715950 | ||
|
|
020f2ab867 | ||
|
|
2071230859 | ||
|
|
413d0b01cf | ||
|
|
4abd97910d | ||
|
|
564ed3ed88 | ||
|
|
c90814e515 | ||
|
|
576395a469 | ||
|
|
f75a60e074 | ||
|
|
3e5f366f4f | ||
|
|
a456f8d969 | ||
|
|
cfe17e7fe5 | ||
|
|
99891db75c | ||
|
|
287c7ed0e7 | ||
|
|
8bd881070c | ||
|
|
9cce6e8052 | ||
|
|
b6068667c9 | ||
|
|
309f741588 | ||
|
|
858e0e0c0b | ||
|
|
01fd0c92e3 | ||
|
|
23dcc53fed | ||
|
|
08cd7bf6e7 | ||
|
|
35c14adc12 | ||
|
|
3b992521af | ||
|
|
646e78dc14 | ||
|
|
4a7f6afd6a | ||
|
|
8294e14664 | ||
|
|
1102c88de7 | ||
|
|
c98620a552 | ||
|
|
24fcaed649 | ||
|
|
2c1eadfea3 | ||
|
|
ffe87e904f | ||
|
|
fbd5da7237 | ||
|
|
ecccc89a70 | ||
|
|
2bacc663b1 | ||
|
|
c5dc0fbf0e | ||
|
|
f358cf3bf4 | ||
|
|
6b00e8e0ca | ||
|
|
5abf4d7556 | ||
|
|
8ca421c140 | ||
|
|
1e3da4b77f | ||
|
|
7c784ad112 | ||
|
|
f72d264b6b | ||
|
|
c6526fc609 | ||
|
|
3741fa77d2 | ||
|
|
ca70d5dee8 | ||
|
|
85ad1f59da | ||
|
|
73e6736566 | ||
|
|
c08cc33394 | ||
|
|
8c3ed628dc | ||
|
|
792acdb408 | ||
|
|
c3fd7076c1 | ||
|
|
33f630beca | ||
|
|
f1f6262be7 | ||
|
|
42147b9e86 | ||
|
|
2854c5c761 | ||
|
|
731576fbfe | ||
|
|
36329b053d | ||
|
|
3b93bb25ff | ||
|
|
2496402a8c | ||
|
|
8a0e9a4fe5 | ||
|
|
5049bcdce5 | ||
|
|
1c77a5a4ab | ||
|
|
9c42ccb0bd | ||
|
|
dd50d3f2ab | ||
|
|
5f3b97ceff | ||
|
|
2d1e40bd20 | ||
|
|
a0bb423311 | ||
|
|
0f8c236e9d | ||
|
|
736044938d | ||
|
|
983ba32def | ||
|
|
d2dae62215 | ||
|
|
9540444061 | ||
|
|
482c0cf52b | ||
|
|
849f01a0d1 | ||
|
|
11770763df | ||
|
|
df66940f0f | ||
|
|
80f6a13e79 | ||
|
|
0f8aa07e5c | ||
|
|
6b77e7f8bd | ||
|
|
838decca95 | ||
|
|
e6c5b80afd | ||
|
|
e7b5604ec5 | ||
|
|
ea3baba376 | ||
|
|
c6a5b7c292 | ||
|
|
45e90e0134 | ||
|
|
18b1414d6c | ||
|
|
7facdd8590 | ||
|
|
6cf1230c13 | ||
|
|
d70b0d3f05 | ||
|
|
527b5e3caa | ||
|
|
4e1b53ed36 | ||
|
|
eb69638be1 | ||
|
|
a5c4497c01 | ||
|
|
1033aeb186 | ||
|
|
e5d502d2f8 | ||
|
|
55e4fe2ab7 | ||
|
|
8e2d210d42 | ||
|
|
ec8d069057 | ||
|
|
2edb688882 | ||
|
|
3403cbbae6 | ||
|
|
b52b9325ba | ||
|
|
1e3b131a84 | ||
|
|
250a374e07 | ||
|
|
f618d71c0e | ||
|
|
3d37ba5120 | ||
|
|
e785cc70d1 | ||
|
|
3bf52ec2f2 | ||
|
|
19dbb5304c | ||
|
|
4d13c285ea | ||
|
|
08ce6903ce | ||
|
|
75e76eb637 | ||
|
|
954d12a04d | ||
|
|
bcc0e80439 | ||
|
|
436f7411f8 | ||
|
|
21381f3fa7 | ||
|
|
db9d88ad7b | ||
|
|
6085e03da0 | ||
|
|
b2407b0191 | ||
|
|
8181625365 | ||
|
|
24052c3dff | ||
|
|
c15707fd70 | ||
|
|
b4f1b069be | ||
|
|
129815f3dd | ||
|
|
a7eaa017b1 | ||
|
|
6e326921f9 | ||
|
|
4a3fd9984d | ||
|
|
0074f50573 | ||
|
|
ba8dc44eac | ||
|
|
b0d3d34fcd | ||
|
|
7f0ed4f5be | ||
|
|
7fc54ec2d8 | ||
|
|
f0add8a043 | ||
|
|
5b608e114b | ||
|
|
06e1fa88b9 | ||
|
|
a6b2a098c1 | ||
|
|
4f0684ffac | ||
|
|
fbfcf97e18 | ||
|
|
45b6a92f61 | ||
|
|
c6814925ac | ||
|
|
6c114a539d | ||
|
|
b6c82968b8 | ||
|
|
2271aceab8 | ||
|
|
0db07e9455 | ||
|
|
f158591054 | ||
|
|
1b210355bf | ||
|
|
075c341a37 | ||
|
|
bab25c04db | ||
|
|
2a60dfa087 | ||
|
|
ef69c73e89 | ||
|
|
bf9534e1ee | ||
|
|
0e11bd6a0c | ||
|
|
ff10cfd5dc | ||
|
|
400f35cbb0 | ||
|
|
59340bca4c | ||
|
|
6c62f31f0a | ||
|
|
dd5fb425fa | ||
|
|
c903cf4801 | ||
|
|
1c26f7dd43 | ||
|
|
c546a3e875 | ||
|
|
2183de96a1 | ||
|
|
fb1fc6f909 | ||
|
|
20b31d1cca | ||
|
|
f716d705c5 | ||
|
|
1fca93be10 | ||
|
|
f96a2b3d81 | ||
|
|
a7edd713d8 | ||
|
|
bca1c2dea5 | ||
|
|
dfad37d0f9 | ||
|
|
3376955b80 | ||
|
|
e98b130d77 | ||
|
|
a450053b0a | ||
|
|
0b5b315a7f | ||
|
|
5cc31f6539 | ||
|
|
f0248daa1e | ||
|
|
798562e75b | ||
|
|
68e7d3f0d5 | ||
|
|
e9bb297ed2 | ||
|
|
d5e525dd19 | ||
|
|
c326818764 | ||
|
|
57ec457f32 | ||
|
|
c04b13641f | ||
|
|
0bf570c98d | ||
|
|
28dfcbd6b0 |
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
# Copyright David Abrahams 2004. Use, modification and distribution is
|
||||
# subject to 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)
|
||||
|
||||
#
|
||||
# Generate html, TeX, and PDF versions of all the source files
|
||||
@@ -13,7 +16,7 @@ if 0:
|
||||
for s in sources:
|
||||
syscmd('boosthtml %s' % s)
|
||||
else:
|
||||
extensions = ('html', 'tex', 'pdf')
|
||||
extensions = ('html', 'pdf')
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
extensions = sys.argv[1:]
|
||||
@@ -23,7 +26,7 @@ else:
|
||||
for s in sources
|
||||
]
|
||||
|
||||
print 'make -k %s' % ' '.join(all)
|
||||
syscmd('make -k %s' % ' '.join(all))
|
||||
print 'make %s' % ' '.join(all)
|
||||
syscmd('make %s' % ' '.join(all))
|
||||
|
||||
|
||||
|
||||
@@ -152,9 +152,10 @@ in <tt class="literal"><span class="pre">indirect_iterator</span></tt>.</li>
|
||||
<li><a class="reference" href="iterator_traits.html"><tt class="literal"><span class="pre">iterator_traits.hpp</span></tt></a> (<a class="reference" href="iterator_traits.pdf">PDF</a>): Provides <a class="reference" href="../../mpl/doc/index.html">MPL</a>-compatible metafunctions which
|
||||
retrieve an iterator's traits. Also corrects for the deficiencies
|
||||
of broken implementations of <tt class="literal"><span class="pre">std::iterator_traits</span></tt>.</li>
|
||||
<li><a class="reference" href="interoperable.html"><tt class="literal"><span class="pre">interoperable.hpp</span></tt></a> (<a class="reference" href="interoperable.pdf">PDF</a>): Provides an <a class="reference" href="../../mpl/doc/index.html">MPL</a>-compatible metafunction for
|
||||
testing iterator interoperability</li>
|
||||
</ul>
|
||||
<!-- * |interoperable|_ (PDF__): Provides an MPL_\ -compatible metafunction for
|
||||
testing iterator interoperability -->
|
||||
<!-- comment! __ interoperable.pdf -->
|
||||
</div>
|
||||
<div class="section" id="testing-and-concept-checking">
|
||||
<h2><a class="toc-backref" href="#id27" name="testing-and-concept-checking">Testing and Concept Checking</a></h2>
|
||||
|
||||
@@ -212,8 +212,8 @@ Traits
|
||||
retrieve an iterator's traits. Also corrects for the deficiencies
|
||||
of broken implementations of ``std::iterator_traits``.
|
||||
|
||||
* |interoperable|_ (PDF__): Provides an MPL_\ -compatible metafunction for
|
||||
testing iterator interoperability
|
||||
.. * |interoperable|_ (PDF__): Provides an MPL_\ -compatible metafunction for
|
||||
testing iterator interoperability
|
||||
|
||||
.. |pointee| replace:: ``pointee.hpp``
|
||||
.. _pointee: pointee.html
|
||||
@@ -225,7 +225,7 @@ __ iterator_traits.pdf
|
||||
|
||||
.. |interoperable| replace:: ``interoperable.hpp``
|
||||
.. _interoperable: interoperable.html
|
||||
__ interoperable.pdf
|
||||
.. comment! __ interoperable.pdf
|
||||
|
||||
.. _MPL: ../../mpl/doc/index.html
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -7,7 +7,7 @@
|
||||
<title>Iterator Archetype</title>
|
||||
<meta name="author" content="David Abrahams, Jeremy Siek, Thomas Witt" />
|
||||
<meta name="organization" content="Boost Consulting, Indiana University Open Systems Lab, Zephyr Associates, Inc." />
|
||||
<meta name="date" content="2004-01-16" />
|
||||
<meta name="date" content="2004-01-27" />
|
||||
<meta name="copyright" content="Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2004. All rights reserved" />
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
</head>
|
||||
@@ -26,7 +26,7 @@
|
||||
<td><a class="first reference" href="http://www.boost-consulting.com">Boost Consulting</a>, Indiana University <a class="reference" href="http://www.osl.iu.edu">Open Systems
|
||||
Lab</a>, <a class="last reference" href="http://www.styleadvisor.com">Zephyr Associates, Inc.</a></td></tr>
|
||||
<tr><th class="docinfo-name">Date:</th>
|
||||
<td>2004-01-16</td></tr>
|
||||
<td>2004-01-27</td></tr>
|
||||
<tr><th class="docinfo-name">Copyright:</th>
|
||||
<td>Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2004. All rights reserved</td></tr>
|
||||
</tbody>
|
||||
@@ -35,7 +35,11 @@ Lab</a>, <a class="last reference" href="http://www.styleadvisor.com">Zephyr Ass
|
||||
<col class="field-name" />
|
||||
<col class="field-body" />
|
||||
<tbody valign="top">
|
||||
<tr class="field"><th class="field-name">abstract:</th><td class="field-body">iterator archetypes provide a means to check the compile time requirements of a generic component on its iterator arguments.</td>
|
||||
<tr class="field"><th class="field-name">abstract:</th><td class="field-body">The <tt class="literal"><span class="pre">iterator_archetype</span></tt> class constructs a minimal implementation of
|
||||
one of the iterator access concepts and one of the iterator traversal concepts.
|
||||
This is used for doing a compile-time check to see if a the type requirements
|
||||
of a template are really enough to cover the implementation of the template.
|
||||
For further information see the documentation for the <a class="reference" href="../../concept_check/index.html"><tt class="literal"><span class="pre">boost::concept_check</span></tt></a> library.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Binary file not shown.
@@ -13,7 +13,15 @@
|
||||
.. _`Open Systems Lab`: http://www.osl.iu.edu
|
||||
.. _`Zephyr Associates, Inc.`: http://www.styleadvisor.com
|
||||
|
||||
:abstract: iterator archetypes provide a means to check the compile time requirements of a generic component on its iterator arguments.
|
||||
:abstract: The ``iterator_archetype`` class constructs a minimal implementation of
|
||||
one of the iterator access concepts and one of the iterator traversal concepts.
|
||||
This is used for doing a compile-time check to see if a the type requirements
|
||||
of a template are really enough to cover the implementation of the template.
|
||||
For further information see the documentation for the |concepts|_ library.
|
||||
|
||||
.. |concepts| replace:: ``boost::concept_check``
|
||||
.. _concepts: ../../concept_check/index.html
|
||||
|
||||
|
||||
.. contents:: Table of Contents
|
||||
|
||||
@@ -178,4 +186,4 @@ The nested trait types are defined as follows:
|
||||
|
||||
2. X is convertible to TraversalCategory
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -21,7 +21,7 @@
|
||||
<tr><th class="docinfo-name">Author:</th>
|
||||
<td>David Abrahams</td></tr>
|
||||
<tr><th class="docinfo-name">Contact:</th>
|
||||
<td><a class="first reference" href="mailto:dave@boost-consulting.com">dave@boost-consulting.com</a>, <a class="reference" href="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</a>, <a class="last reference" href="mailto:witt@ive.uni-hannover.de">witt@ive.uni-hannover.de</a></td></tr>
|
||||
<td><a class="first last reference" href="mailto:dave@boost-consulting.com">dave@boost-consulting.com</a></td></tr>
|
||||
<tr><th class="docinfo-name">Organization:</th>
|
||||
<td><a class="first last reference" href="http://www.boost-consulting.com">Boost Consulting</a></td></tr>
|
||||
<tr><th class="docinfo-name">Date:</th>
|
||||
|
||||
@@ -10,4 +10,11 @@ test-suite iterator_examples
|
||||
[ run node_iterator1.cpp ]
|
||||
[ run node_iterator2.cpp ]
|
||||
[ run node_iterator3.cpp ]
|
||||
[ run counting_iterator_example.cpp ]
|
||||
[ run filter_iterator_example.cpp ]
|
||||
[ run function_output_iterator_example.cpp ]
|
||||
[ run indirect_iterator_example.cpp ]
|
||||
[ run permutation_iterator_example.cpp ]
|
||||
[ run reverse_iterator_example.cpp ]
|
||||
[ run transform_iterator_example.cpp ]
|
||||
;
|
||||
|
||||
@@ -26,7 +26,9 @@ namespace boost {
|
||||
typedef void pointer;
|
||||
typedef void reference;
|
||||
|
||||
explicit function_output_iterator(const UnaryFunction& f = UnaryFunction())
|
||||
explicit function_output_iterator() {}
|
||||
|
||||
explicit function_output_iterator(const UnaryFunction& f)
|
||||
: m_f(f) {}
|
||||
|
||||
struct output_proxy {
|
||||
|
||||
@@ -107,13 +107,8 @@ struct iterator_facade_default_category
|
||||
// check for readability
|
||||
, is_convertible<Reference, ValueParam>
|
||||
>
|
||||
, mpl::if_<
|
||||
iterator_writability_disabled<ValueParam,Reference>
|
||||
, std::input_iterator_tag
|
||||
, input_output_iterator_tag
|
||||
>
|
||||
|
||||
, mpl::identity<std::output_iterator_tag>
|
||||
, mpl::identity<std::input_iterator_tag>
|
||||
, mpl::identity<Traversal>
|
||||
>
|
||||
>
|
||||
{
|
||||
|
||||
@@ -27,7 +27,11 @@ namespace boost {
|
||||
//
|
||||
// Traversal Categories
|
||||
//
|
||||
struct incrementable_traversal_tag {};
|
||||
|
||||
struct no_traversal_tag {};
|
||||
|
||||
struct incrementable_traversal_tag
|
||||
: no_traversal_tag {};
|
||||
|
||||
struct single_pass_traversal_tag
|
||||
: incrementable_traversal_tag {};
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
|
||||
subproject libs/iterator/test ;
|
||||
|
||||
subinclude libs/iterator/example ;
|
||||
|
||||
import testing ;
|
||||
|
||||
test-suite iterator
|
||||
@@ -35,10 +33,11 @@ test-suite iterator
|
||||
|
||||
[ run unit_tests.cpp ]
|
||||
[ run concept_tests.cpp ]
|
||||
[ compile-fail lvalue_concept_fail_expected.cpp ]
|
||||
[ run iterator_adaptor_cc.cpp ]
|
||||
[ run iterator_adaptor_test.cpp ]
|
||||
[ compile iterator_archetype_cc.cpp ]
|
||||
[ compile-fail iterator_archetype_default_ctor.cpp ]
|
||||
[ compile-fail lvalue_concept_fail_expected.cpp ]
|
||||
[ run transform_iterator_test.cpp ]
|
||||
[ run indirect_iterator_test.cpp ]
|
||||
[ compile indirect_iterator_member_types.cpp ]
|
||||
@@ -58,5 +57,5 @@ test-suite iterator
|
||||
[ run ../../utility/reverse_iterator_example.cpp ]
|
||||
[ run ../../utility/transform_iterator_example.cpp ]
|
||||
[ run ../../utility/iterator_traits_test.cpp ]
|
||||
|
||||
[ run ../../utility/shared_iterator_test.cpp ]
|
||||
;
|
||||
|
||||
22
test/iterator_archetype_default_ctor.cpp
Executable file
22
test/iterator_archetype_default_ctor.cpp
Executable file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Copyright Thomas Witt 2004. Permission to copy, use,
|
||||
// modify, sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
//
|
||||
#include <boost/iterator/iterator_archetypes.hpp>
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
typedef boost::iterator_archetype<
|
||||
int
|
||||
, boost::iterator_archetypes::readable_iterator_t
|
||||
, boost::single_pass_traversal_tag
|
||||
> iter;
|
||||
|
||||
// single_pass_traversal iterators are not required to be
|
||||
// default constructible
|
||||
iter it;
|
||||
}
|
||||
@@ -82,86 +82,6 @@ int main( void )
|
||||
size_t num_successful_tests = 0;
|
||||
size_t num_failed_tests = 0;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Make sure tuples are supported
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
std::cout << "Basic tuple support: "
|
||||
<< std::flush;
|
||||
|
||||
typedef boost::tuples::tuple<int, double> mytuple;
|
||||
mytuple t1;
|
||||
boost::tuples::get<0>(t1) = 42;
|
||||
boost::tuples::get<1>(t1) = 42.1;
|
||||
|
||||
if( 2 == boost::tuples::length<mytuple>::value &&
|
||||
42 == boost::tuples::get<0>(t1) &&
|
||||
42.1 == boost::tuples::get<1>(t1)
|
||||
)
|
||||
{
|
||||
++num_successful_tests;
|
||||
std::cout << "OK" << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
++num_failed_tests = 0;
|
||||
std::cout << "not OK" << std::endl;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Make sure iterator adaptor is supported
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
std::cout << "Basic iterator adaptor support: "
|
||||
<< std::flush;
|
||||
|
||||
std::set<int> s;
|
||||
s.insert(42);
|
||||
s.insert(43);
|
||||
s.insert(44);
|
||||
|
||||
typedef boost::transform_iterator<
|
||||
std::binder1st<std::plus<int> >,
|
||||
std::set<int>::iterator
|
||||
>
|
||||
add_seven_iterator;
|
||||
|
||||
typedef boost::transform_iterator<
|
||||
std::binder1st<std::plus<int> >,
|
||||
std::set<int>::const_iterator
|
||||
>
|
||||
const_add_seven_iterator;
|
||||
|
||||
add_seven_iterator set_run(s.begin(), std::bind1st(std::plus<int>(), 7));
|
||||
add_seven_iterator set_end(s.end(), std::bind1st(std::plus<int>(), 7));
|
||||
|
||||
const_add_seven_iterator const_set_run(s.begin(), std::bind1st(std::plus<int>(), 7));
|
||||
// set_run = const_set_run; // Error: can't convert from const to non-const
|
||||
const_set_run = set_run;
|
||||
|
||||
if( 49 == *set_run &&
|
||||
50 == *++set_run &&
|
||||
51 == *++set_run &&
|
||||
set_end == ++set_run &&
|
||||
49 == *const_set_run &&
|
||||
50 == *++const_set_run &&
|
||||
51 == *++const_set_run &&
|
||||
set_end == ++const_set_run
|
||||
)
|
||||
{
|
||||
++num_successful_tests;
|
||||
std::cout << "OK" << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
++num_failed_tests = 0;
|
||||
std::cout << "not OK" << std::endl;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Zip iterator construction and dereferencing
|
||||
|
||||
Reference in New Issue
Block a user