Compare commits

..

42 Commits

Author SHA1 Message Date
nobody
f69bef76cf This commit was manufactured by cvs2svn to create tag
'Version_1_31_0'.

[SVN r22162]
2004-02-04 15:24:32 +00:00
Dave Abrahams
1bed251dac merged from trunk
[SVN r22127]
2004-02-01 23:40:41 +00:00
Dave Abrahams
afa62b3b29 merged from trunk
[SVN r22098]
2004-02-01 04:06:49 +00:00
Dave Abrahams
60e24dfffa merged from trunk
[SVN r22049]
2004-01-29 13:33:58 +00:00
nobody
a2bfab9713 This commit was manufactured by cvs2svn to create branch 'RC_1_31_0'.
[SVN r22044]
2004-01-29 05:55:27 +00:00
Dave Abrahams
9ee673c283 merged from trunk
[SVN r22042]
2004-01-29 05:54:30 +00:00
Jeremy Siek
4c5a9fe922 changed to compile-fail
[SVN r22020]
2004-01-28 14:05:34 +00:00
Jeremy Siek
cbfbb116f4 added lvalue_concept_fail_expected.cpp
[SVN r22019]
2004-01-28 14:05:33 +00:00
Jeremy Siek
8421fbc3ee new file
[SVN r22018]
2004-01-28 14:04:21 +00:00
Jeremy Siek
28de0803e5 changed LvalueIteratorConcept to really catch errors
[SVN r22017]
2004-01-28 14:01:45 +00:00
Jeremy Siek
e17936284b added ignore_unused_variable_warning
[SVN r22008]
2004-01-27 18:33:36 +00:00
Jeremy Siek
6317b09a7c merged in fixes
[SVN r22007]
2004-01-27 18:31:31 +00:00
Jeremy Siek
63cefe2d8f merged in fix
[SVN r22006]
2004-01-27 18:30:13 +00:00
Dave Abrahams
47c8138283 merged from trunk
[SVN r21998]
2004-01-27 12:44:04 +00:00
Dave Abrahams
d15302e683 Bring branch up-to-date with trunk
[SVN r21992]
2004-01-27 04:50:52 +00:00
Dave Abrahams
189533437f merged from trunk
[SVN r21991]
2004-01-27 04:18:44 +00:00
nobody
a4dbdcb00c This commit was manufactured by cvs2svn to create branch 'RC_1_31_0'.
[SVN r21989]
2004-01-27 04:12:55 +00:00
Jeremy Siek
be55d6db14 merging in updates
[SVN r21975]
2004-01-26 17:12:04 +00:00
Dave Abrahams
0069b61686 merged from trunk
[SVN r21974]
2004-01-26 14:54:00 +00:00
Jeremy Siek
fd736d0def merging updates
[SVN r21940]
2004-01-26 04:12:43 +00:00
Dave Abrahams
78831a2f67 merged from trunk
[SVN r21898]
2004-01-24 18:41:14 +00:00
Dave Abrahams
7f164fea93 merged from trunk
[SVN r21894]
2004-01-24 17:49:47 +00:00
Jeremy Siek
1c5454ba96 merged in fix
[SVN r21891]
2004-01-24 16:19:12 +00:00
Jeremy Siek
62ecb49bb5 merged fix
[SVN r21869]
2004-01-21 20:03:32 +00:00
Dave Abrahams
c90b123e7a merged from trunk
[SVN r21801]
2004-01-18 16:21:14 +00:00
Dave Abrahams
5d71ddeec4 merged from trunk
[SVN r21774]
2004-01-15 19:03:20 +00:00
Dave Abrahams
cce82ba2c2 merged from trunk
[SVN r21763]
2004-01-15 17:09:18 +00:00
nobody
4576a34820 This commit was manufactured by cvs2svn to create branch 'RC_1_31_0'.
[SVN r21755]
2004-01-15 15:33:36 +00:00
Dave Abrahams
ace1b2c7e3 merged from trunk
[SVN r21722]
2004-01-14 04:39:55 +00:00
Dave Abrahams
183c32f112 merged from trunk
[SVN r21697]
2004-01-13 19:19:35 +00:00
Dave Abrahams
7b199b7b45 merged from trunk
[SVN r21680]
2004-01-13 15:45:17 +00:00
nobody
f05bfdccb7 This commit was manufactured by cvs2svn to create branch 'RC_1_31_0'.
[SVN r21650]
2004-01-12 20:58:23 +00:00
Hartmut Kaiser
c65ab1a129 Changed the constructor parameter to be a const reference.
[SVN r21592]
2004-01-11 15:43:29 +00:00
Dave Abrahams
129e9151f7 merged from trunk
[SVN r21590]
2004-01-11 15:12:15 +00:00
Dave Abrahams
6379561eb0 merged from trunk
[SVN r21580]
2004-01-11 00:35:03 +00:00
Dave Abrahams
f1d694c2d6 merged from trunk
[SVN r21548]
2004-01-08 14:58:22 +00:00
Dave Abrahams
556175ea08 Intel8 GCC-spoofing workaround
[SVN r21531]
2004-01-07 15:21:57 +00:00
Dave Abrahams
cf068fba24 merged from trunk
[SVN r21516]
2004-01-06 17:36:30 +00:00
nobody
f5d1feb76e This commit was manufactured by cvs2svn to create branch 'RC_1_31_0'.
[SVN r21515]
2004-01-06 17:35:37 +00:00
Dave Abrahams
3b8c0a6025 merged from trunk
[SVN r21462]
2004-01-03 20:21:59 +00:00
Dave Abrahams
05a3df17e2 merged from trunk
[SVN r21456]
2004-01-03 18:23:02 +00:00
nobody
44065357e6 This commit was manufactured by cvs2svn to create branch 'RC_1_31_0'.
[SVN r21427]
2003-12-30 12:10:04 +00:00
23 changed files with 4640 additions and 6024 deletions

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

View File

@@ -1,7 +1,4 @@
#!/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
@@ -16,7 +13,7 @@ if 0:
for s in sources:
syscmd('boosthtml %s' % s)
else:
extensions = ('html', 'pdf')
extensions = ('html', 'tex', 'pdf')
if len(sys.argv) > 1:
extensions = sys.argv[1:]
@@ -26,7 +23,7 @@ else:
for s in sources
]
print 'make %s' % ' '.join(all)
syscmd('make %s' % ' '.join(all))
print 'make -k %s' % ' '.join(all)
syscmd('make -k %s' % ' '.join(all))

View File

@@ -152,10 +152,9 @@ 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>

View File

@@ -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
.. comment! __ interoperable.pdf
__ interoperable.pdf
.. _MPL: ../../mpl/doc/index.html

Binary file not shown.

Binary file not shown.

View File

@@ -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-27" />
<meta name="date" content="2004-01-16" />
<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-27</td></tr>
<td>2004-01-16</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,11 +35,7 @@ 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">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 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>
</tbody>
</table>

Binary file not shown.

View File

@@ -13,15 +13,7 @@
.. _`Open Systems Lab`: http://www.osl.iu.edu
.. _`Zephyr Associates, Inc.`: http://www.styleadvisor.com
: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
:abstract: iterator archetypes provide a means to check the compile time requirements of a generic component on its iterator arguments.
.. contents:: Table of Contents
@@ -186,4 +178,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.

View File

@@ -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 last reference" href="mailto:dave&#64;boost-consulting.com">dave&#64;boost-consulting.com</a></td></tr>
<td><a class="first reference" href="mailto:dave&#64;boost-consulting.com">dave&#64;boost-consulting.com</a>, <a class="reference" href="mailto:jsiek&#64;osl.iu.edu">jsiek&#64;osl.iu.edu</a>, <a class="last reference" href="mailto:witt&#64;ive.uni-hannover.de">witt&#64;ive.uni-hannover.de</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>

View File

@@ -10,11 +10,4 @@ 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 ]
;

View File

@@ -26,9 +26,7 @@ namespace boost {
typedef void pointer;
typedef void reference;
explicit function_output_iterator() {}
explicit function_output_iterator(const UnaryFunction& f)
explicit function_output_iterator(const UnaryFunction& f = UnaryFunction())
: m_f(f) {}
struct output_proxy {

View File

@@ -107,8 +107,13 @@ struct iterator_facade_default_category
// check for readability
, is_convertible<Reference, ValueParam>
>
, mpl::identity<std::input_iterator_tag>
, mpl::identity<Traversal>
, mpl::if_<
iterator_writability_disabled<ValueParam,Reference>
, std::input_iterator_tag
, input_output_iterator_tag
>
, mpl::identity<std::output_iterator_tag>
>
>
{

View File

@@ -27,11 +27,7 @@ namespace boost {
//
// Traversal Categories
//
struct no_traversal_tag {};
struct incrementable_traversal_tag
: no_traversal_tag {};
struct incrementable_traversal_tag {};
struct single_pass_traversal_tag
: incrementable_traversal_tag {};

View File

@@ -6,6 +6,8 @@
subproject libs/iterator/test ;
subinclude libs/iterator/example ;
import testing ;
test-suite iterator
@@ -33,11 +35,10 @@ 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 ]
@@ -57,5 +58,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 ]
;

View File

@@ -1,22 +0,0 @@
//
// 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;
}

View File

@@ -82,6 +82,86 @@ 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