mirror of
https://github.com/boostorg/iterator.git
synced 2025-06-30 22:41:10 +02:00
Compare commits
6 Commits
boost-1.40
...
svn-branch
Author | SHA1 | Date | |
---|---|---|---|
2afce5a560 | |||
f824853f3d | |||
945c8e27c0 | |||
bf7d904bf8 | |||
efecbd0d27 | |||
65e229fb0d |
@ -1,30 +0,0 @@
|
||||
#
|
||||
# Copyright Troy D. Straszheim
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See http://www.boost.org/LICENSE_1_0.txt
|
||||
#
|
||||
#----------------------------------------------------------------------------
|
||||
# This file was automatically generated from the original CMakeLists.txt file
|
||||
# Add a variable to hold the headers for the library
|
||||
set (lib_headers
|
||||
iterator.hpp
|
||||
iterator
|
||||
)
|
||||
|
||||
# Add a library target to the build system
|
||||
boost_library_project(
|
||||
iterator
|
||||
# SRCDIRS
|
||||
TESTDIRS test
|
||||
HEADERS ${lib_headers}
|
||||
# DOCDIRS
|
||||
DESCRIPTION "A system of concepts which extend the C++ standard iterator requirementsand a framework of components for building iterators based on these extended concepts and includes several useful iterator adaptors."
|
||||
MODULARIZED
|
||||
AUTHORS "David Abrahams <dave -at- boostpro.com>"
|
||||
"Jeremy Siek <jeremy.siek -at- gmail.com>"
|
||||
"Thomas Witt <witt - at - acm.org>"
|
||||
# MAINTAINERS
|
||||
)
|
||||
|
||||
|
@ -16,7 +16,5 @@ boostbook standalone
|
||||
<xsl:param>toc.max.depth=3
|
||||
<xsl:param>toc.section.depth=3
|
||||
<xsl:param>chunk.section.depth=4
|
||||
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/iterator/doc
|
||||
;
|
||||
|
||||
|
||||
|
@ -40,7 +40,7 @@ Lab</a>, <a class="reference external" href="http://www.styleadvisor.com">Zephyr
|
||||
<col class="field-body" />
|
||||
<tbody valign="top">
|
||||
<tr class="field"><th class="field-name">Abstract:</th><td class="field-body">The Boost Iterator Library contains two parts. The first
|
||||
is a system of <a class="reference external" href="http://www.boost.org/more/generic_programming.html#concept">concepts</a> which extend the C++ standard
|
||||
is a system of <a class="reference external" href="http://www.boost.org/community/generic_programming.html#concept">concepts</a> which extend the C++ standard
|
||||
iterator requirements. The second is a framework of
|
||||
components for building iterators based on these
|
||||
extended concepts and includes several useful iterator
|
||||
@ -179,7 +179,7 @@ implement iterators, you probably wrote a <tt class="docutils literal"><span cla
|
||||
captures the core operations of your iterator. In the new library
|
||||
design, you'll move those same core operations into the body of the
|
||||
iterator class itself. If you were writing a family of iterators,
|
||||
you probably wrote a <a class="reference external" href="http://www.boost.org/more/generic_programming.html#type_generator">type generator</a> to build the
|
||||
you probably wrote a <a class="reference external" href="http://www.boost.org/community/generic_programming.html#type_generator">type generator</a> to build the
|
||||
<tt class="docutils literal"><span class="pre">iterator_adaptor</span></tt> specialization you needed; in the new library
|
||||
design you don't need a type generator (though may want to keep it
|
||||
around as a compatibility aid for older code) because, due to the
|
||||
|
@ -43,7 +43,7 @@ __ ../../../index.htm
|
||||
The components of the Boost Iterator Library replace the
|
||||
older Boost Iterator Adaptor Library.
|
||||
|
||||
.. _concepts: http://www.boost.org/more/generic_programming.html#concept
|
||||
.. _concepts: http://www.boost.org/community/generic_programming.html#concept
|
||||
|
||||
.. contents:: **Table of Contents**
|
||||
|
||||
@ -271,7 +271,7 @@ over how your iterator works: you can add additional constructors,
|
||||
or even override the iterator functionality provided by the
|
||||
library.
|
||||
|
||||
.. _`type generator`: http://www.boost.org/more/generic_programming.html#type_generator
|
||||
.. _`type generator`: http://www.boost.org/community/generic_programming.html#type_generator
|
||||
|
||||
If you're looking for the old ``projection_iterator`` component,
|
||||
its functionality has been merged into ``transform_iterator``: as
|
||||
|
@ -866,7 +866,7 @@ operator -(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
|
||||
<p>In this section we'll walk through the implementation of a few
|
||||
iterators using <tt class="docutils literal"><span class="pre">iterator_facade</span></tt>, based around the simple
|
||||
example of a linked list of polymorphic objects. This example was
|
||||
inspired by a <a class="reference external" href="http://thread.gmane.org/gmane.comp.lib.boost.user/5100">posting</a> by Keith Macdonald on the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost-Users</a>
|
||||
inspired by a <a class="reference external" href="http://thread.gmane.org/gmane.comp.lib.boost.user/5100">posting</a> by Keith Macdonald on the <a class="reference external" href="http://www.boost.org/community/groups.html#users">Boost-Users</a>
|
||||
mailing list.</p>
|
||||
<div class="section" id="the-problem">
|
||||
<h2><a class="toc-backref" href="#id32">The Problem</a></h2>
|
||||
|
@ -8,7 +8,7 @@ example of a linked list of polymorphic objects. This example was
|
||||
inspired by a `posting`__ by Keith Macdonald on the `Boost-Users`_
|
||||
mailing list.
|
||||
|
||||
.. _`Boost-Users`: http://www.boost.org/more/mailing_lists.htm#users
|
||||
.. _`Boost-Users`: http://www.boost.org/community/groups.html#users
|
||||
|
||||
__ http://thread.gmane.org/gmane.comp.lib.boost.user/5100
|
||||
|
||||
|
@ -288,7 +288,7 @@ Metrowerks CodeWarrior versions prior to 9.0]
|
||||
|
||||
You can see an example program that exercises this version of the
|
||||
node iterators
|
||||
[@../example/node_iterator3.cpp `here`].
|
||||
[@/libs/iterator/example/node_iterator3.cpp `here`].
|
||||
|
||||
|
||||
In the case of `node_iter`, it's not very compelling to pass
|
||||
|
@ -39,7 +39,7 @@ The output is:
|
||||
indirectly printing out the numbers from 0 to 7
|
||||
0 1 2 3 4 5 6
|
||||
|
||||
The source code for this example can be found [@../example/counting_iterator_example.cpp here].
|
||||
The source code for this example can be found [@/libs/iterator/example/counting_iterator_example.cpp here].
|
||||
|
||||
[h2 Reference]
|
||||
|
||||
|
@ -7,7 +7,7 @@ example of a linked list of polymorphic objects. This example was
|
||||
inspired by a
|
||||
[@http://thread.gmane.org/gmane.comp.lib.boost.user/5100 `posting`]
|
||||
by Keith Macdonald on the
|
||||
[@http://www.boost.org/more/mailing_lists.htm#users `Boost-Users`]
|
||||
[@http://www.boost.org/community/groups.html#users `Boost-Users`]
|
||||
mailing list.
|
||||
|
||||
|
||||
@ -255,7 +255,7 @@ make them private and grant friendship to
|
||||
|
||||
Voila; a complete and conforming readable, forward-traversal
|
||||
iterator! For a working example of its use, see
|
||||
[@../example/node_iterator1.cpp `this program`].
|
||||
[@/libs/iterator/example/node_iterator1.cpp `this program`].
|
||||
|
||||
__ ../example/node_iterator1.cpp
|
||||
|
||||
@ -432,7 +432,7 @@ __ ../example/node_iterator2.hpp
|
||||
|
||||
You can see an example program which exercises our interoperable
|
||||
iterators
|
||||
[@../example/node_iterator2.cpp `here`].
|
||||
[@/libs/iterator/example/node_iterator2.cpp `here`].
|
||||
|
||||
|
||||
[h2 Telling the Truth]
|
||||
|
@ -75,7 +75,7 @@ The output is:
|
||||
0 -1 4 5 8
|
||||
|
||||
|
||||
The source code for this example can be found [@../example/filter_iterator_example.cpp here].
|
||||
The source code for this example can be found [@/libs/iterator/example/filter_iterator_example.cpp here].
|
||||
|
||||
[h2 Reference]
|
||||
|
||||
|
@ -73,7 +73,7 @@ The output is:
|
||||
|
||||
|
||||
The source code for this example can be found
|
||||
[@../example/indirect_iterator_example.cpp here].
|
||||
[@/libs/iterator/example/indirect_iterator_example.cpp here].
|
||||
|
||||
|
||||
[h2 Reference]
|
||||
|
@ -28,11 +28,11 @@
|
||||
|
||||
[/ Links ]
|
||||
|
||||
[def _iterator_ [@../../libs/iterator/doc/index.html Boost.Iterator]]
|
||||
[def _iterator_ [@/libs/iterator/doc/index.html Boost.Iterator]]
|
||||
|
||||
[section:intro Introduction]
|
||||
|
||||
[def _concepts_ [@http://www.boost.org/more/generic_programming.html#concept concepts]]
|
||||
[def _concepts_ [@http://www.boost.org/community/generic_programming.html#concept concepts]]
|
||||
|
||||
The Boost Iterator Library contains two parts. The first
|
||||
is a system of _concepts_ which extend the C++ standard
|
||||
@ -112,7 +112,7 @@ templates.
|
||||
[def _transform_ [@./transform_iterator.html `transform_iterator`]]
|
||||
[def _zip_ [@./zip_iterator.html `zip_iterator`]]
|
||||
|
||||
[def _shared_ptr_ [@../../smart_ptr/shared_ptr.htm `shared_ptr`]]
|
||||
[def _shared_ptr_ [@/libs/smart_ptr/shared_ptr.htm `shared_ptr`]]
|
||||
|
||||
* _counting_: an iterator over a sequence of consecutive values.
|
||||
Implements a "lazy sequence"
|
||||
@ -152,7 +152,7 @@ templates.
|
||||
[def _pointee_ [@./pointee.html `pointee.hpp`]]
|
||||
[def _iterator_traits_ [@./iterator_traits.html `iterator_traits.hpp`]]
|
||||
[def _interoperable_ [@./interoperable.html `interoperable.hpp`]]
|
||||
[def _MPL_ [@../../mpl/doc/index.html [*MPL]]]
|
||||
[def _MPL_ [@/libs/mpl/doc/index.html [*MPL]]]
|
||||
|
||||
* _pointee_: Provides the capability to deduce the referent types
|
||||
of pointers, smart pointers and iterators in generic code. Used
|
||||
@ -203,7 +203,7 @@ templates.
|
||||
|
||||
[section:upgrading Upgrading from the old Boost Iterator Adaptor Library]
|
||||
|
||||
[def _type_generator_ [@http://www.boost.org/more/generic_programming.html#type_generator type generator]]
|
||||
[def _type_generator_ [@http://www.boost.org/community/generic_programming.html#type_generator type generator]]
|
||||
|
||||
If you have been using the old Boost Iterator Adaptor library to
|
||||
implement iterators, you probably wrote a `Policies` class which
|
||||
|
@ -84,7 +84,7 @@ The output is:
|
||||
|
||||
|
||||
The source code for this example can be found
|
||||
[@../example/permutation_iter_example.cpp here].
|
||||
[@/libs/iterator/example/permutation_iter_example.cpp here].
|
||||
|
||||
[h2 Reference]
|
||||
|
||||
|
@ -41,7 +41,7 @@ The output is:
|
||||
|
||||
|
||||
The source code for this example can be found
|
||||
[@../example/reverse_iterator_example.cpp here].
|
||||
[@/libs/iterator/example/reverse_iterator_example.cpp here].
|
||||
|
||||
[h2 Reference]
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
[section:shared_container Shared Container Iterator]
|
||||
|
||||
Defined in header [@../../../boost/shared_container_iterator.hpp `boost/shared_container_iterator.hpp`].
|
||||
Defined in header [@/boost/shared_container_iterator.hpp `boost/shared_container_iterator.hpp`].
|
||||
|
||||
The purpose of the shared container iterator is to attach the lifetime
|
||||
of a container to the lifetime of its iterators. In other words, the
|
||||
@ -56,7 +56,7 @@ original shared pointer `ints` ceases to exist after `set_range()`
|
||||
returns, the `shared_counter_iterator` objects maintain references to
|
||||
the underlying vector and thereby extend the container's lifetime.
|
||||
|
||||
[@../../../libs/utility/shared_iterator_example1.cpp `shared_iterator_example1.cpp`]:
|
||||
[@/libs/utility/shared_iterator_example1.cpp `shared_iterator_example1.cpp`]:
|
||||
|
||||
#include "shared_container_iterator.hpp"
|
||||
#include "boost/shared_ptr.hpp"
|
||||
@ -139,7 +139,7 @@ explicitly specifying its type.
|
||||
This example, similar to the previous,
|
||||
uses `make_shared_container_iterator()` to create the iterators.
|
||||
|
||||
[@../../../libs/utility/shared_iterator_example2.cpp `shared_iterator_example2.cpp`]:
|
||||
[@/libs/utility/shared_iterator_example2.cpp `shared_iterator_example2.cpp`]:
|
||||
|
||||
#include "shared_container_iterator.hpp"
|
||||
#include "boost/shared_ptr.hpp"
|
||||
@ -200,7 +200,7 @@ named. The output from this example is the same as the previous.
|
||||
|
||||
In the following example, a range of values is returned as a pair of shared_container_iterator objects.
|
||||
|
||||
[@../../../libs/utility/shared_iterator_example3.cpp `shared_iterator_example3.cpp`]:
|
||||
[@/libs/utility/shared_iterator_example3.cpp `shared_iterator_example3.cpp`]:
|
||||
|
||||
#include "shared_container_iterator.hpp"
|
||||
#include "boost/shared_ptr.hpp"
|
||||
|
@ -55,12 +55,12 @@ Header `<boost/iterator/iterator_traits.hpp>`:
|
||||
[h2 Broken Compiler Notes]
|
||||
|
||||
Because of workarounds in Boost, you may find that these
|
||||
[@../../mpl/doc/index.html#metafunctions metafunctions] actually work better than the facilities provided by
|
||||
[@/libs/mpl/doc/index.html#metafunctions metafunctions] actually work better than the facilities provided by
|
||||
your compiler's standard library.
|
||||
|
||||
On compilers that don't support partial specialization, such as
|
||||
Microsoft Visual C++ 6.0 or 7.0, you may need to manually invoke
|
||||
[@../../type_traits/index.html#transformations BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION] on the
|
||||
[@/libs/type_traits/index.html#transformations BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION] on the
|
||||
`value_type` of pointers that are passed to these metafunctions.
|
||||
|
||||
Because of bugs in the implementation of GCC-2.9x, the name of
|
||||
|
@ -44,7 +44,7 @@ The output is:
|
||||
|
||||
|
||||
The source code for this example can be found
|
||||
[@../example/transform_iterator_example.cpp here].
|
||||
[@/libs/iterator/example/transform_iterator_example.cpp here].
|
||||
|
||||
[h2 Reference]
|
||||
|
||||
|
@ -122,7 +122,7 @@ template.
|
||||
|
||||
For an introduction to using concept checking classes, see
|
||||
the documentation for the
|
||||
[@../../concept_check/index.html `boost::concept_check`] library.
|
||||
[@/libs/concept_check/index.html `boost::concept_check`] library.
|
||||
|
||||
|
||||
[h2 Reference]
|
||||
|
@ -47,7 +47,7 @@
|
||||
#endif
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
||||
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x5A0)) \
|
||||
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x531)) \
|
||||
|| (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \
|
||||
|| BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) \
|
||||
|| BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
|
||||
|
@ -110,7 +110,7 @@ namespace boost
|
||||
private:
|
||||
typename super_t::reference dereference() const
|
||||
{
|
||||
# if BOOST_WORKAROUND(__BORLANDC__, < 0x5A0 )
|
||||
# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
|
||||
return const_cast<super_t::reference>(**this->base());
|
||||
# else
|
||||
return **this->base();
|
||||
|
@ -24,14 +24,9 @@
|
||||
|
||||
#ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
|
||||
# include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
# if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610))
|
||||
# include <boost/type_traits/add_reference.hpp>
|
||||
# endif
|
||||
|
||||
#else
|
||||
#else
|
||||
# include <boost/type_traits/add_reference.hpp>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <boost/iterator/detail/config_def.hpp>
|
||||
|
||||
|
@ -470,7 +470,8 @@ namespace boost
|
||||
//
|
||||
class iterator_core_access
|
||||
{
|
||||
# if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
|
||||
# if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) \
|
||||
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
|
||||
// Tasteless as this may seem, making all members public allows member templates
|
||||
// to work in the absence of member template friends.
|
||||
public:
|
||||
|
@ -1 +0,0 @@
|
||||
boost_module(iterator DEPENDS mpl type_traits function concept_check)
|
@ -1,39 +0,0 @@
|
||||
#
|
||||
# Copyright Troy D. Straszheim
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See http://www.boost.org/LICENSE_1_0.txt
|
||||
#
|
||||
boost_additional_test_dependencies(iterator BOOST_DEPENDS test tuple smart_ptr)
|
||||
|
||||
# These first two tests will run last, and are expected to fail
|
||||
# for many less-capable compilers.
|
||||
|
||||
boost_test_compile_fail(interoperable_fail)
|
||||
# test uses expected success, so that we catch unrelated
|
||||
# compilation problems.
|
||||
boost_test_run(is_convertible_fail)
|
||||
boost_test_run(zip_iterator_test)
|
||||
|
||||
# These tests should work for just about everything.
|
||||
boost_test_compile(is_lvalue_iterator)
|
||||
boost_test_compile(is_readable_iterator)
|
||||
boost_test_compile(pointee)
|
||||
|
||||
boost_test_run(unit_tests)
|
||||
boost_test_run(concept_tests)
|
||||
boost_test_run(iterator_adaptor_cc)
|
||||
boost_test_run(iterator_adaptor_test)
|
||||
boost_test_compile(iterator_archetype_cc)
|
||||
boost_test_compile_fail(iter_archetype_default_ctor)
|
||||
boost_test_compile_fail(lvalue_concept_fail)
|
||||
boost_test_run(transform_iterator_test)
|
||||
boost_test_run(indirect_iterator_test)
|
||||
boost_test_compile(indirect_iter_member_types)
|
||||
boost_test_run(filter_iterator_test)
|
||||
boost_test_run(iterator_facade)
|
||||
boost_test_run(reverse_iterator_test)
|
||||
boost_test_run(counting_iterator_test)
|
||||
boost_test_run(interoperable)
|
||||
boost_test_run(iterator_traits_test)
|
||||
boost_test_run(permutation_iterator_test)
|
Reference in New Issue
Block a user