[boost-doc-zh] r414 committed - 翻译 range 库的 qbk 文件并生成 html 目录
- From: boost-doc-zh@xxxxxxxxxxxxxx
- To: boost-doc-zh-notify@xxxxxxxxxxxxx
- Date: Wed, 23 Jun 2010 04:19:00 +0000
Revision: 414
Author: alai04
Date: Tue Jun 22 21:13:43 2010
Log: 翻译 range 库的 qbk 文件并生成 html 目录
http://code.google.com/p/boost-doc-zh/source/detail?r=414
Added:
/trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_introduction.html
/trunk/libs/range/doc/html/range/reference/overview.html
Modified:
/trunk/libs/range/doc/boost_range.qbk
/trunk/libs/range/doc/concepts.qbk
/trunk/libs/range/doc/examples.qbk
/trunk/libs/range/doc/faq.qbk
/trunk/libs/range/doc/headers.qbk
/trunk/libs/range/doc/history_ack.qbk
/trunk/libs/range/doc/html/index.html
/trunk/libs/range/doc/html/quickbook_HTML.manifest
/trunk/libs/range/doc/html/range/concepts/bidirectional_range.html
/trunk/libs/range/doc/html/range/concepts/concept_checking.html
/trunk/libs/range/doc/html/range/concepts/forward_range.html
/trunk/libs/range/doc/html/range/concepts/overview.html
/trunk/libs/range/doc/html/range/concepts/random_access_range.html
/trunk/libs/range/doc/html/range/concepts/single_pass_range.html
/trunk/libs/range/doc/html/range/concepts.html
/trunk/libs/range/doc/html/range/examples.html
/trunk/libs/range/doc/html/range/faq.html
/trunk/libs/range/doc/html/range/history_ack.html
/trunk/libs/range/doc/html/range/introduction.html
/trunk/libs/range/doc/html/range/library_headers/adaptors.html
/trunk/libs/range/doc/html/range/library_headers/algorithm.html
/trunk/libs/range/doc/html/range/library_headers/algorithm_extensions.html
/trunk/libs/range/doc/html/range/library_headers/general.html
/trunk/libs/range/doc/html/range/library_headers.html
/trunk/libs/range/doc/html/range/mfc_atl/atl_ranges.html
/trunk/libs/range/doc/html/range/mfc_atl/const_ranges.html
/trunk/libs/range/doc/html/range/mfc_atl/mfc_ranges.html
/trunk/libs/range/doc/html/range/mfc_atl/references.html
/trunk/libs/range/doc/html/range/mfc_atl/requirements.html
/trunk/libs/range/doc/html/range/mfc_atl.html
/trunk/libs/range/doc/html/range/portability.html
/trunk/libs/range/doc/html/range/reference/adaptors/general_requirements.html
/trunk/libs/range/doc/html/range/reference/adaptors/introduction.html
/trunk/libs/range/doc/html/range/reference/adaptors/reference/adjacent_filtered.html
/trunk/libs/range/doc/html/range/reference/adaptors/reference/copied.html
/trunk/libs/range/doc/html/range/reference/adaptors/reference/filtered.html
/trunk/libs/range/doc/html/range/reference/adaptors/reference/indexed.html
/trunk/libs/range/doc/html/range/reference/adaptors/reference/indirected.html
/trunk/libs/range/doc/html/range/reference/adaptors/reference/map_keys.html
/trunk/libs/range/doc/html/range/reference/adaptors/reference/map_values.html
/trunk/libs/range/doc/html/range/reference/adaptors/reference/replaced.html
/trunk/libs/range/doc/html/range/reference/adaptors/reference/replaced_if.html
/trunk/libs/range/doc/html/range/reference/adaptors/reference/reversed.html
/trunk/libs/range/doc/html/range/reference/adaptors/reference/sliced.html
/trunk/libs/range/doc/html/range/reference/adaptors/reference/strided.html
/trunk/libs/range/doc/html/range/reference/adaptors/reference/tokenized.html
/trunk/libs/range/doc/html/range/reference/adaptors/reference/transformed.html
/trunk/libs/range/doc/html/range/reference/adaptors/reference/uniqued.html
/trunk/libs/range/doc/html/range/reference/adaptors/reference.html
/trunk/libs/range/doc/html/range/reference/adaptors.html
/trunk/libs/range/doc/html/range/reference/algorithms/heap/make_heap.html
/trunk/libs/range/doc/html/range/reference/algorithms/heap/pop_heap.html
/trunk/libs/range/doc/html/range/reference/algorithms/heap/push_heap.html
/trunk/libs/range/doc/html/range/reference/algorithms/heap/sort_heap.html
/trunk/libs/range/doc/html/range/reference/algorithms/heap.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/copy.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/copy_backward.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/fill.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/fill_n.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/generate.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/inplace_merge.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/merge.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/nth_element.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/partial_sort.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/partition.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/random_shuffle.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/remove.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/remove_copy.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/remove_copy_if.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/remove_if.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/replace.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/replace_copy.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/replace_copy_if.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/replace_if.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/reverse.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/reverse_copy.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/rotate.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/rotate_copy.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/sort.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/stable_partition.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/stable_sort.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/swap_ranges.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/transform.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/unique.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating/unique_copy.html
/trunk/libs/range/doc/html/range/reference/algorithms/mutating.html
/trunk/libs/range/doc/html/range/reference/algorithms/new/copy_n.html
/trunk/libs/range/doc/html/range/reference/algorithms/new/erase.html
/trunk/libs/range/doc/html/range/reference/algorithms/new/for_each.html
/trunk/libs/range/doc/html/range/reference/algorithms/new/insert.html
/trunk/libs/range/doc/html/range/reference/algorithms/new/iota.html
/trunk/libs/range/doc/html/range/reference/algorithms/new/is_sorted.html
/trunk/libs/range/doc/html/range/reference/algorithms/new/overwrite.html
/trunk/libs/range/doc/html/range/reference/algorithms/new/push_back.html
/trunk/libs/range/doc/html/range/reference/algorithms/new/push_front.html
/trunk/libs/range/doc/html/range/reference/algorithms/new/remove_erase.html
/trunk/libs/range/doc/html/range/reference/algorithms/new/remove_erase_if.html
/trunk/libs/range/doc/html/range/reference/algorithms/new.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/adjacent_find.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/binary_search.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/count.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/count_if.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/equal.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/equal_range.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/find.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/find_end.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/find_first_of.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/find_if.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/for_each.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/lexicographical_compare.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/lower_bound.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/max_element.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/min_element.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/mismatch.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/search.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/search_n.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating/upper_bound.html
/trunk/libs/range/doc/html/range/reference/algorithms/non_mutating.html
/trunk/libs/range/doc/html/range/reference/algorithms/numeric/accumulate.html
/trunk/libs/range/doc/html/range/reference/algorithms/numeric/adjacent_difference.html
/trunk/libs/range/doc/html/range/reference/algorithms/numeric/inner_product.html
/trunk/libs/range/doc/html/range/reference/algorithms/numeric/partial_sum.html
/trunk/libs/range/doc/html/range/reference/algorithms/numeric.html
/trunk/libs/range/doc/html/range/reference/algorithms/permutation/next_permutation.html
/trunk/libs/range/doc/html/range/reference/algorithms/permutation/prev_permutation.html
/trunk/libs/range/doc/html/range/reference/algorithms/permutation.html
/trunk/libs/range/doc/html/range/reference/algorithms/set/includes.html
/trunk/libs/range/doc/html/range/reference/algorithms/set/set_difference.html
/trunk/libs/range/doc/html/range/reference/algorithms/set/set_intersection.html
/trunk/libs/range/doc/html/range/reference/algorithms/set/set_symmetric_difference.html
/trunk/libs/range/doc/html/range/reference/algorithms/set/set_union.html
/trunk/libs/range/doc/html/range/reference/algorithms/set.html
/trunk/libs/range/doc/html/range/reference/algorithms.html
/trunk/libs/range/doc/html/range/reference/concept_implementation/semantics/functions.html
/trunk/libs/range/doc/html/range/reference/concept_implementation/semantics/metafunctions.html
/trunk/libs/range/doc/html/range/reference/concept_implementation/semantics.html
/trunk/libs/range/doc/html/range/reference/concept_implementation/synopsis.html
/trunk/libs/range/doc/html/range/reference/concept_implementation.html
/trunk/libs/range/doc/html/range/reference/extending/method_1.html
/trunk/libs/range/doc/html/range/reference/extending/method_2.html
/trunk/libs/range/doc/html/range/reference/extending/method_3/method_3_1.html
/trunk/libs/range/doc/html/range/reference/extending/method_3/method_3_2.html
/trunk/libs/range/doc/html/range/reference/extending/method_3.html
/trunk/libs/range/doc/html/range/reference/extending.html
/trunk/libs/range/doc/html/range/reference/ranges/counting_range.html
/trunk/libs/range/doc/html/range/reference/ranges/irange.html
/trunk/libs/range/doc/html/range/reference/ranges/istream_range.html
/trunk/libs/range/doc/html/range/reference/ranges.html
/trunk/libs/range/doc/html/range/reference/utilities/iterator_range.html
/trunk/libs/range/doc/html/range/reference/utilities/join.html
/trunk/libs/range/doc/html/range/reference/utilities/sub_range.html
/trunk/libs/range/doc/html/range/reference/utilities.html
/trunk/libs/range/doc/html/range/reference.html
/trunk/libs/range/doc/html/range/style_guide.html
/trunk/libs/range/doc/html/range/upgrade/upgrade_from_1_34.html
/trunk/libs/range/doc/html/range/upgrade/upgrade_from_1_42.html
/trunk/libs/range/doc/html/range/upgrade.html
/trunk/libs/range/doc/introduction.qbk
/trunk/libs/range/doc/mfc_atl.qbk
/trunk/libs/range/doc/portability.qbk
/trunk/libs/range/doc/reference/adaptors/adjacent_filtered.qbk
/trunk/libs/range/doc/reference/adaptors/copied.qbk
/trunk/libs/range/doc/reference/adaptors/filtered.qbk
/trunk/libs/range/doc/reference/adaptors/indexed.qbk
/trunk/libs/range/doc/reference/adaptors/indirected.qbk
/trunk/libs/range/doc/reference/adaptors/map_keys.qbk
/trunk/libs/range/doc/reference/adaptors/map_values.qbk
/trunk/libs/range/doc/reference/adaptors/replaced.qbk
/trunk/libs/range/doc/reference/adaptors/replaced_if.qbk
/trunk/libs/range/doc/reference/adaptors/reversed.qbk
/trunk/libs/range/doc/reference/adaptors/sliced.qbk
/trunk/libs/range/doc/reference/adaptors/strided.qbk
/trunk/libs/range/doc/reference/adaptors/tokenized.qbk
/trunk/libs/range/doc/reference/adaptors/transformed.qbk
/trunk/libs/range/doc/reference/adaptors/uniqued.qbk
/trunk/libs/range/doc/reference/adaptors.qbk
/trunk/libs/range/doc/reference/algorithm/adjacent_find.qbk
/trunk/libs/range/doc/reference/algorithm/binary_search.qbk
/trunk/libs/range/doc/reference/algorithm/copy.qbk
/trunk/libs/range/doc/reference/algorithm/copy_backward.qbk
/trunk/libs/range/doc/reference/algorithm/count.qbk
/trunk/libs/range/doc/reference/algorithm/count_if.qbk
/trunk/libs/range/doc/reference/algorithm/equal.qbk
/trunk/libs/range/doc/reference/algorithm/equal_range.qbk
/trunk/libs/range/doc/reference/algorithm/fill.qbk
/trunk/libs/range/doc/reference/algorithm/fill_n.qbk
/trunk/libs/range/doc/reference/algorithm/find.qbk
/trunk/libs/range/doc/reference/algorithm/find_end.qbk
/trunk/libs/range/doc/reference/algorithm/find_first_of.qbk
/trunk/libs/range/doc/reference/algorithm/find_if.qbk
/trunk/libs/range/doc/reference/algorithm/for_each.qbk
/trunk/libs/range/doc/reference/algorithm/generate.qbk
/trunk/libs/range/doc/reference/algorithm/includes.qbk
/trunk/libs/range/doc/reference/algorithm/inplace_merge.qbk
/trunk/libs/range/doc/reference/algorithm/lexicographical_compare.qbk
/trunk/libs/range/doc/reference/algorithm/lower_bound.qbk
/trunk/libs/range/doc/reference/algorithm/make_heap.qbk
/trunk/libs/range/doc/reference/algorithm/max_element.qbk
/trunk/libs/range/doc/reference/algorithm/merge.qbk
/trunk/libs/range/doc/reference/algorithm/min_element.qbk
/trunk/libs/range/doc/reference/algorithm/mismatch.qbk
/trunk/libs/range/doc/reference/algorithm/next_permutation.qbk
/trunk/libs/range/doc/reference/algorithm/nth_element.qbk
/trunk/libs/range/doc/reference/algorithm/partial_sort.qbk
/trunk/libs/range/doc/reference/algorithm/partition.qbk
/trunk/libs/range/doc/reference/algorithm/pop_heap.qbk
/trunk/libs/range/doc/reference/algorithm/prev_permutation.qbk
/trunk/libs/range/doc/reference/algorithm/push_heap.qbk
/trunk/libs/range/doc/reference/algorithm/random_shuffle.qbk
/trunk/libs/range/doc/reference/algorithm/remove.qbk
/trunk/libs/range/doc/reference/algorithm/remove_copy.qbk
/trunk/libs/range/doc/reference/algorithm/remove_copy_if.qbk
/trunk/libs/range/doc/reference/algorithm/remove_if.qbk
/trunk/libs/range/doc/reference/algorithm/replace.qbk
/trunk/libs/range/doc/reference/algorithm/replace_copy.qbk
/trunk/libs/range/doc/reference/algorithm/replace_copy_if.qbk
/trunk/libs/range/doc/reference/algorithm/replace_if.qbk
/trunk/libs/range/doc/reference/algorithm/reverse.qbk
/trunk/libs/range/doc/reference/algorithm/reverse_copy.qbk
/trunk/libs/range/doc/reference/algorithm/rotate.qbk
/trunk/libs/range/doc/reference/algorithm/rotate_copy.qbk
/trunk/libs/range/doc/reference/algorithm/search.qbk
/trunk/libs/range/doc/reference/algorithm/search_n.qbk
/trunk/libs/range/doc/reference/algorithm/set_difference.qbk
/trunk/libs/range/doc/reference/algorithm/set_intersection.qbk
/trunk/libs/range/doc/reference/algorithm/set_symmetric_difference.qbk
/trunk/libs/range/doc/reference/algorithm/set_union.qbk
/trunk/libs/range/doc/reference/algorithm/sort.qbk
/trunk/libs/range/doc/reference/algorithm/sort_heap.qbk
/trunk/libs/range/doc/reference/algorithm/stable_partition.qbk
/trunk/libs/range/doc/reference/algorithm/stable_sort.qbk
/trunk/libs/range/doc/reference/algorithm/swap_ranges.qbk
/trunk/libs/range/doc/reference/algorithm/transform.qbk
/trunk/libs/range/doc/reference/algorithm/unique.qbk
/trunk/libs/range/doc/reference/algorithm/unique_copy.qbk
/trunk/libs/range/doc/reference/algorithm/upper_bound.qbk
/trunk/libs/range/doc/reference/algorithm_ext/copy_n.qbk
/trunk/libs/range/doc/reference/algorithm_ext/erase.qbk
/trunk/libs/range/doc/reference/algorithm_ext/for_each.qbk
/trunk/libs/range/doc/reference/algorithm_ext/insert.qbk
/trunk/libs/range/doc/reference/algorithm_ext/iota.qbk
/trunk/libs/range/doc/reference/algorithm_ext/is_sorted.qbk
/trunk/libs/range/doc/reference/algorithm_ext/overwrite.qbk
/trunk/libs/range/doc/reference/algorithm_ext/push_back.qbk
/trunk/libs/range/doc/reference/algorithm_ext/push_front.qbk
/trunk/libs/range/doc/reference/algorithm_ext/remove_erase.qbk
/trunk/libs/range/doc/reference/algorithm_ext/remove_erase_if.qbk
/trunk/libs/range/doc/reference/algorithms.qbk
/trunk/libs/range/doc/reference/extending.qbk
/trunk/libs/range/doc/reference/numeric/accumulate.qbk
/trunk/libs/range/doc/reference/numeric/adjacent_difference.qbk
/trunk/libs/range/doc/reference/numeric/inner_product.qbk
/trunk/libs/range/doc/reference/numeric/partial_sum.qbk
/trunk/libs/range/doc/reference/overview.qbk
/trunk/libs/range/doc/reference/ranges/counting_range.qbk
/trunk/libs/range/doc/reference/ranges/irange.qbk
/trunk/libs/range/doc/reference/ranges/istream_range.qbk
/trunk/libs/range/doc/reference/ranges.qbk
/trunk/libs/range/doc/reference/semantics.qbk
/trunk/libs/range/doc/reference/synopsis.qbk
/trunk/libs/range/doc/reference/utilities.qbk
/trunk/libs/range/doc/reference.qbk
/trunk/libs/range/doc/style.qbk
/trunk/libs/range/doc/upgrade.qbk
=======================================
--- /dev/null
+++
/trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_introduction.html
Tue Jun 22 21:13:43 2010
@@ -0,0 +1,274 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Introduction and motivation
介绍与动机</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css"
type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../algorithms.html" title="Range Algorithm
区间算法">
+<link rel="prev" href="../algorithms.html" title="Range Algorithm
区间算法">
+<link rel="next" href="mutating.html" title="Mutating algorithms
可写算法">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86"
src="../../../../../../../boost.png"></td>
+<td align="center"><a href="../../../../../../../index.html">Home</a></td>
+<td align="center"><a
href="../../../../../../libraries.htm">Libraries</a></td>
+<td align="center"><a
href="http://www.boost.org/users/people.html">People</a></td>
+<td align="center"><a
href="http://www.boost.org/users/faq.html">FAQ</a></td>
+<td align="center"><a
href="../../../../../../../more/index.htm">More</a></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../algorithms.html"><img
src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../algorithms.html"><img
src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../index.html"><img
src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="mutating.html"><img
src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.algorithms.range_algorithm_introduction"></a><a
class="link" href="range_algorithm_introduction.html" title="Introduction
and motivation 介绍与动机">
+ Introduction and motivation
介绍与动机</a>
+</h4></div></div></div>
+<p>
+ In its most simple form a <span class="bold"><strong>Range
Algorithm</strong></span>
+ (or range-based algorithm) is simply an iterator-based algorithm
where
+ the <span class="emphasis"><em>two</em></span> iterator
arguments have been replaced by
+ <span class="emphasis"><em>one</em></span> range argument. For
example, we may write<br>
+
在最简单的形式下,<span
class="bold"><strong>区间算法</strong></span>(或基于区间的算法)只是一个基于迭代器的算法,其中/两个/迭代器参数被替换为/一个/区间参数。例如,我们可以写
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span>
<span class="special"><</span><span class="identifier">boost</span><span
class="special">/</span><span class="identifier">range</span><span
class="special">/</span><span class="identifier">algorithm</span><span
class="special">.</span><span class="identifier">hpp</span><span
class="special">></span>
+<span class="preprocessor">#include</span> <span
class="special"><</span><span class="identifier">vector</span><span
class="special">></span>
+
+<span class="identifier">std</span><span class="special">::</span><span
class="identifier">vector</span><span class="special"><</span><span
class="keyword">int</span><span class="special">></span> <span
class="identifier">vec</span> <span class="special">=</span> <span
class="special">...;</span>
+<span class="identifier">boost</span><span class="special">::</span><span
class="identifier">sort</span><span class="special">(</span><span
class="identifier">vec</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ instead of<br> 来替代
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span
class="special">::</span><span class="identifier">sort</span><span
class="special">(</span><span class="identifier">vec</span><span
class="special">.</span><span class="identifier">begin</span><span
class="special">(),</span> <span class="identifier">vec</span><span
class="special">.</span><span class="identifier">end</span><span
class="special">());</span>
+</pre>
+<p>
+ </p>
+<p>
+ However, the return type of range algorithms is almost always
different
+ from that of existing iterator-based algorithms.<br>
但是,区间算法的返回类型几乎总是与已有的基于迭代器的算法有所不同。
+ </p>
+<p>
+ One group of algorithms, like <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">sort</span><span class="special">()</span></code>, will
simply return the same range so
+ that we can continue to pass the range around and/or further
modify it.
+ Because of this we may write<br>
一组算法,如 <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">sort</span><span
class="special">()</span></code>,只是返回同一个区间,这样我们就可以继续将这个区间传递下去,或是进一步修改它。因此我们可以写
+
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span
class="special">:</span><span class="identifier">unique</span><span
class="special">(</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">sort</span><span
class="special">(</span><span class="identifier">vec</span><span
class="special">));</span>
+</pre>
+<p>
+ to first sort the range and then run <code
class="computeroutput"><span class="identifier">unique</span><span
class="special">()</span></code> on the sorted range.<br>
首先对区间进行排序,然后对排好序的区间执行
+ <code class="computeroutput"><span
class="identifier">unique</span><span
class="special">()</span></code>。
+ </p>
+<p>
+ Algorithms like <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">unique</span><span class="special">()</span></code>
+ fall into another group of algorithms that return (potentially)
narrowed
+ views of the original range. By default <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">unique</span><span
class="special">(</span><span class="identifier">rng</span><span
class="special">)</span></code> returns the range <code
class="computeroutput"><span class="special">[</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">begin</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">),</span> <span
class="identifier">found</span><span class="special">)</span></code>
+ where <code class="computeroutput"><span
class="identifier">found</span></code> denotes the
+ iterator returned by <code class="computeroutput"><span
class="identifier">std</span><span class="special">::</span><span
class="identifier">unique</span><span class="special">(</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">begin</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">),</span> <span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">end</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">))</span></code><br>
象 <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">unique</span><span class="special">()</span></code>
这样的算法属于另一组算法,它们(有可能)返回原区间的一个较窄的视图。缺省地,<code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">unique</span><span
class="special">(</span><span class="identifier">rng</span><span
class="special">)</span></code>
+ 返回区间 <code
class="computeroutput"><span class="special">[</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">begin</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">),</span> <span
class="identifier">found</span><span
class="special">)</span></code>,其中 <code
class="computeroutput"><span class="identifier">found</span></code>
+ 表示 <code class="computeroutput"><span
class="identifier">std</span><span class="special">::</span><span
class="identifier">unique</span><span class="special">(</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">begin</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">),</span> <span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">end</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">))</span></code>
+ 所返回的迭代器。
+ </p>
+<p>
+ Therefore exactly the unique values can be copied by writing<br>
因此,实际上这些唯一的值可以通过以下方式来复制
+
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">copy</span><span
class="special">(</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">unique</span><span
class="special">(</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">sort</span><span
class="special">(</span><span class="identifier">vec</span><span
class="special">)),</span>
+ <span class="identifier">std</span><span
class="special">::</span><span
class="identifier">ostream_iterator</span><span
class="special"><</span><span class="keyword">int</span><span
class="special">>(</span><span class="identifier">std</span><span
class="special">::</span><span class="identifier">cout</span><span
class="special">));</span>
+</pre>
+<p>
+ </p>
+<p>
+ Algorithms like <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">unique</span></code> usually return the same range:
+ <code class="computeroutput"><span class="special">[</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">begin</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">),</span> <span
class="identifier">found</span><span class="special">)</span></code>.
However, this behaviour may be changed
+ by supplying the algorithms with a template argument:<br>
象 <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">unique</span></code>
这样的算法通常返回相同的区间:<code
class="computeroutput"><span class="special">[</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">begin</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">),</span> <span
class="identifier">found</span><span
class="special">)</span></code>。不过,该行为可以通过向算法提供一个模板参数来改变:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Expression 表达式
+ </p>
+ </th>
+<th>
+ <p>
+ Return 返回
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">unique</span><span class="special"><</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">return_found</span><span
class="special">>(</span><span class="identifier">rng</span><span
class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ returns a single iterator like <code
class="computeroutput"><span class="identifier">std</span><span
class="special">::</span><span class="identifier">unique</span></code><br>
+ 象 <code class="computeroutput"><span
class="identifier">std</span><span class="special">::</span><span
class="identifier">unique</span></code>
那样返回单个迭代器
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">unique</span><span class="special"><</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">return_begin_found</span><span
class="special">>(</span><span class="identifier">rng</span><span
class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ returns the range <code class="computeroutput"><span
class="special">[</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">begin</span><span
class="special">(</span><span class="identifier">rng</span><span
class="special">),</span>
+ <span class="identifier">found</span><span
class="special">)</span></code>
+ (this is the default)<br>
返回区间 <code class="computeroutput"><span
class="special">[</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">begin</span><span
class="special">(</span><span class="identifier">rng</span><span
class="special">),</span>
+ <span class="identifier">found</span><span
class="special">)</span></code>
+ (这是缺省行为)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">unique</span><span class="special"><</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">return_begin_next</span><span
class="special">>(</span><span class="identifier">rng</span><span
class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ returns the range <code class="computeroutput"><span
class="special">[</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">begin</span><span
class="special">(</span><span class="identifier">rng</span><span
class="special">),</span>
+ <span class="identifier">boost</span><span
class="special">::</span><span class="identifier">next</span><span
class="special">(</span><span class="identifier">found</span><span
class="special">))</span></code><br>
+ 返回区间 <code
class="computeroutput"><span class="special">[</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">begin</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">),</span> <span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">next</span><span class="special">(</span><span
class="identifier">found</span><span class="special">))</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">unique</span><span class="special"><</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">return_found_end</span><span
class="special">>(</span><span class="identifier">rng</span><span
class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ returns the range <code class="computeroutput"><span
class="special">[</span><span class="identifier">found</span><span
class="special">,</span>
+ <span class="identifier">boost</span><span
class="special">::</span><span class="identifier">end</span><span
class="special">(</span><span class="identifier">rng</span><span
class="special">))</span></code><br>
+ 返回区间 <code
class="computeroutput"><span class="special">[</span><span
class="identifier">found</span><span class="special">,</span> <span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">end</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">))</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">unique</span><span class="special"><</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">return_next_end</span><span
class="special">>(</span><span class="identifier">rng</span><span
class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ returns the range <code class="computeroutput"><span
class="special">[</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">next</span><span
class="special">(</span><span class="identifier">found</span><span
class="special">),</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">end</span><span
class="special">(</span><span class="identifier">rng</span><span
class="special">))</span></code><br>
+ 返回区间 <code
class="computeroutput"><span class="special">[</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">next</span><span class="special">(</span><span
class="identifier">found</span><span class="special">),</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">end</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">))</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">unique</span><span class="special"><</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">return_begin_end</span><span
class="special">>(</span><span class="identifier">rng</span><span
class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ returns the entire original range.<br>
返回整个原区间。
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ This functionality has the following advantages:<br>
这个功能有以下好处:
+ </p>
+<div class="orderedlist"><ol type="1">
+<li>
+ it allows for <span class="emphasis"><em><span
class="bold"><strong>seamless functional-style
+ programming</strong></span></em></span> where you do not need
to use named
+ local variables to store intermediate results<br>
它允许 <span
class="emphasis"><em>*无缝函数式编程*</em></span>,你无须使用命名的局部变量来保存中间结果
+ </li>
+<li>
+ it is very <span class="emphasis"><em><span
class="bold"><strong>safe</strong></span></em></span>
+ because the algorithm can verify out-of-bounds conditions and
handle
+ tricky conditions that lead to empty ranges<br>
它非常 <span
class="emphasis"><em>*安全*</em></span>,因为算法可以校验边界溢出的条件并处理引致空区间的特殊条件
+ </li>
+</ol></div>
+<p>
+ For example, consider how easy we may erase the duplicates in a
sorted
+ container:<br>
例如,我们可以很容易地删除一个有序容器中的重复元素:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span
class="special">::</span><span class="identifier">vector</span><span
class="special"><</span><span class="keyword">int</span><span
class="special">></span> <span class="identifier">vec</span> <span
class="special">=</span> <span class="special">...;</span>
+<span class="identifier">boost</span><span class="special">::</span><span
class="identifier">erase</span><span class="special">(</span><span
class="identifier">vec</span><span class="special">,</span> <span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">unique</span><span class="special"><</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">return_found_end</span><span
class="special">>(</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">sort</span><span
class="special">(</span><span class="identifier">vec</span><span
class="special">)));</span>
+</pre>
+<p>
+ </p>
+<p>
+ Notice the use of <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">return_found_end</span></code>.
+ What if we wanted to erase all the duplicates except one of
them? In old-fashined
+ STL-programming we might write<br> 留意 <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span
class="identifier">return_found_end</span></code>
+
的使用。如果我们想删除所有重复而保留其中一个,又该如何?在老式的STL编程中我们可以写
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="comment">// assume 'vec' is
already sorted 假设 `vec` 已排序
+</span><span class="identifier">std</span><span
class="special">::</span><span class="identifier">vector</span><span
class="special"><</span><span class="keyword">int</span><span
class="special">>::</span><span class="identifier">iterator</span> <span
class="identifier">i</span> <span class="special">=</span> <span
class="identifier">std</span><span class="special">::</span><span
class="identifier">unique</span><span class="special">(</span><span
class="identifier">vec</span><span class="special">.</span><span
class="identifier">begin</span><span class="special">(),</span> <span
class="identifier">vec</span><span class="special">.</span><span
class="identifier">end</span><span class="special">());</span>
+
+<span class="comment">// remember this check or you get into problems
记住检查这一点,否则会有问题
+</span><span class="keyword">if</span> <span class="special">(</span><span
class="identifier">i</span> <span class="special">!=</span> <span
class="identifier">vec</span><span class="special">.</span><span
class="identifier">end</span><span class="special">())</span>
+ <span class="special">++</span><span class="identifier">i</span><span
class="special">;</span>
+
+<span class="identifier">vec</span><span class="special">.</span><span
class="identifier">erase</span><span class="special">(</span><span
class="identifier">i</span><span class="special">,</span> <span
class="identifier">vec</span><span class="special">.</span><span
class="identifier">end</span><span class="special">());</span>
+</pre>
+<p>
+ </p>
+<p>
+ The same task may be accomplished simply with<br>
同样的任务可以很简单地完成
+
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">erase</span><span
class="special">(</span><span class="identifier">vec</span><span
class="special">,</span> <span class="identifier">boost</span><span
class="special">::</span><span class="identifier">unique</span><span
class="special"><</span><span class="identifier">boost</span><span
class="special">::</span><span
class="identifier">return_next_end</span><span
class="special">>(</span><span class="identifier">vec</span><span
class="special">));</span>
+</pre>
+<p>
+ and there is no need to worry about generating an invalid range.
Furthermore,
+ if the container is complex, calling <code
class="computeroutput"><span class="identifier">vec</span><span
class="special">.</span><span class="identifier">end</span><span
class="special">()</span></code> several times will be more expensive
+ than using a range algorithm.<br>
而且不用担心生成无效的区间。此外,如果容器比较复杂,多次调用
+ <code class="computeroutput"><span
class="identifier">vec</span><span class="special">.</span><span
class="identifier">end</span><span class="special">()</span></code>
+
会比使用区间算法更浪费。
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2003
-2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See
accompanying
+ file LICENSE_1_0.txt or copy at <a
href="http://www.boost.org/LICENSE_1_0.txt"
target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../algorithms.html"><img
src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../algorithms.html"><img
src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../index.html"><img
src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="mutating.html"><img
src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
=======================================
--- /dev/null
+++ /trunk/libs/range/doc/html/range/reference/overview.html Tue Jun 22
21:13:43 2010
@@ -0,0 +1,71 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Overview 简介</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css"
type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../reference.html" title="Reference
参考手册">
+<link rel="prev" href="../reference.html" title="Reference
参考手册">
+<link rel="next" href="concept_implementation.html" title="Range concept
implementation 区间概念的实现">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86"
src="../../../../../../boost.png"></td>
+<td align="center"><a href="../../../../../../index.html">Home</a></td>
+<td align="center"><a
href="../../../../../libraries.htm">Libraries</a></td>
+<td align="center"><a
href="http://www.boost.org/users/people.html">People</a></td>
+<td align="center"><a
href="http://www.boost.org/users/faq.html">FAQ</a></td>
+<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../reference.html"><img
src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../reference.html"><img
src="../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../index.html"><img
src="../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="concept_implementation.html"><img
src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.reference.overview"></a><a class="link"
href="overview.html" title="Overview 简介"> Overview
简介</a>
+</h3></div></div></div>
+<p>
+ Three types of objects are currently supported by the library:<br>
本库当前支持三种对象类型:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ standard-like containers<br>
类似于标准的容器
+ </li>
+<li><code class="computeroutput"><span class="identifier">std</span><span
class="special">::</span><span class="identifier">pair</span><span
class="special"><</span><span class="identifier">iterator</span><span
class="special">,</span><span class="identifier">iterator</span><span
class="special">></span></code></li>
+<li>
+ built-in arrays<br> 内建数组
+ </li>
+</ul></div>
+<p>
+ Even though the behavior of the primary templates are exactly such
that standard
+ containers will be supported by default, the requirements are much
lower
+ than the standard container requirements. For example, the utility
class
+ <a class="link" href="utilities/iterator_range.html" title="Class
iterator_range"><code class="computeroutput"><span
class="identifier">iterator_range</span></code></a>
+ implements the <a class="link" href="extending.html"
title="Extending the library 扩展本库">minimal
interface</a>
+ required to make the class a <a class="link"
href="../concepts/forward_range.html" title="Forward Range
前向区间">Forward
+ Range</a>.<br>
虽然主模板的缺省行为是要正确提供对标准容器的支持,但是其要求要低于标准容器的要求。
+ 例如,工具类 <a class="link"
href="utilities/iterator_range.html" title="Class iterator_range"><code
class="computeroutput"><span
class="identifier">iterator_range</span></code></a>
实现了满足
+ <a class="link" href="../concepts/forward_range.html"
title="Forward Range 前向区间">Forward Range</a>
的 <a class="link" href="extending.html" title="Extending the library
扩展本库">minimal interface</a>。
+ </p>
+<p>
+ Please also see <a class="link" href="../concepts.html"
title="Range Concepts Range概念">Range concepts</a> for
+ more details.<br>
更多细节请参见 <a class="link"
href="../concepts.html" title="Range Concepts Range概念">Range
+ concepts</a>。
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2003
-2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See
accompanying
+ file LICENSE_1_0.txt or copy at <a
href="http://www.boost.org/LICENSE_1_0.txt"
target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../reference.html"><img
src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../reference.html"><img
src="../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../index.html"><img
src="../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="concept_implementation.html"><img
src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
=======================================
--- /trunk/libs/range/doc/boost_range.qbk Mon May 31 00:54:22 2010
+++ /trunk/libs/range/doc/boost_range.qbk Tue Jun 22 21:13:43 2010
@@ -176,10 +176,12 @@
[def __sgi_partial_sum__
[@http://www.sgi.com/tech/stl/partial_sum.html partial_sum]]
Boost.Range is a collection of concepts and utilities, range-based
algorithms,
-as well as range adaptors that allow for efficient and expressive code.
+as well as range adaptors that allow for efficient and expressive code.\n
+Boost.Range 是一组概念及工具、基于区间的算法,以及可实现高效且易读代码的区
间适配器。
Using Boost.Range inplace of the standard library alternatives results in
more
-readable code and in many cases greater efficiency.
+readable code and in many cases greater efficiency.\n
+用 Boost.Range 替代标准库中的相应工具可以写出更具可读性的代码,而且在多数情
况下更为高效。
[include introduction.qbk]
[include concepts.qbk]
=======================================
--- /trunk/libs/range/doc/concepts.qbk Mon May 31 00:54:22 2010
+++ /trunk/libs/range/doc/concepts.qbk Tue Jun 22 21:13:43 2010
@@ -1,77 +1,103 @@
-[section:concepts Range Concepts]
-
-[section Overview]
-
-A Range is a [*/concept/] similar to the STL
[@http://www.sgi.com/Technology/STL/Container.html Container] concept. A
Range provides iterators for accessing a half-open range
`[first,one_past_last)` of elements and provides information about the
number of elements in the Range. However, a Range has fewer requirements
than a Container.
-
-The motivation for the Range concept is that there are many useful
Container-like types that do not meet the full requirements of Container,
and many algorithms that can be written with this reduced set of
requirements. In particular, a Range does not necessarily
-
-* own the elements that can be accessed through it,
-* have copy semantics,
-
-Because of the second requirement, a Range object must be passed by (const
or non-const) reference in generic code.
-
-The operations that can be performed on a Range is dependent on the
[@../../iterator/doc/new-iter-concepts.html#iterator-traversal-concepts-lib-iterator-traversal
traversal category] of the underlying iterator type. Therefore the range
concepts are named to reflect which traversal category its iterators
support. See also terminology and style guidelines. for more information
about naming of ranges.
-
-The concepts described below specifies associated types as
[@../../libs/mpl/doc/refmanual/metafunction.html metafunctions] and all
functions as free-standing functions to allow for a layer of indirection.
+[section:concepts Range Concepts Range概念]
+
+[section:overview Overview 简介]
+
+A Range is a [*/concept/] similar to the STL
[@http://www.sgi.com/Technology/STL/Container.html Container] concept. A
Range provides iterators for accessing a half-open range
`[first,one_past_last)` of elements and provides information about the
number of elements in the Range. However, a Range has fewer requirements
than a Container.\n
+区间的/概念/类似于STL中的
[@http://www.sgi.com/Technology/STL/Container.html 容器] 概念。
+一个区间提供了访问一个半开放区间 `[first,one_past_last)` 的迭代器,还提供了
关于区间中的元素数量的信息。
+但是,区间比容器少了一点点要求。
+
+The motivation for the Range concept is that there are many useful
Container-like types that do not meet the full requirements of Container,
and many algorithms that can be written with this reduced set of
requirements. In particular, a Range does not necessarily\n
+区间概念的动机是,有许多有用的、类似于容器的类型不能完全满足容器的所有要
求,而很多算法可以依据这个有所简化的要求来编写。
+具体的说,区间不要求:
+
+* own the elements that can be accessed through it,\n
+ 拥有通过它来访问的元素,
+* have copy semantics,\n
+ 具有复制语义,
+
+Because of the second requirement, a Range object must be passed by (const
or non-const) reference in generic code.\n
+由于第二个要求,区间对象必须以(常量或非常量)引用的方式传入泛型代码。
+
+The operations that can be performed on a Range is dependent on the
[@../../iterator/doc/new-iter-concepts.html#iterator-traversal-concepts-lib-iterator-traversal
traversal category] of the underlying iterator type. Therefore the range
concepts are named to reflect which traversal category its iterators
support. See also terminology and style guidelines. for more information
about naming of ranges.\n
+一个区间上可以执行的操作取决于其底层迭代器类型的
+[@../../iterator/doc/new-iter-concepts.html#iterator-traversal-concepts-lib-iterator-traversal
遍
历类别]。
+因此区间概念的命名正是反映了其迭代器所支持的遍历类别。有关区间命名的更多信
息请见 术语及风格 一节。
+
+The concepts described below specifies associated types as
[@../../libs/mpl/doc/refmanual/metafunction.html metafunctions] and all
functions as free-standing functions to allow for a layer of indirection.\n
+下述概念以 [@../../libs/mpl/doc/refmanual/metafunction.html 元函数] 的方式
给出关联类型,而且所有函数都是独立函数,以用于间接层。
[endsect]
-[section Single Pass Range]
-
-[heading Notation]
+[section:single_pass_range Single Pass Range 单遍区间]
+
+[heading Notation 符号]
[table
[]
- [[`X`] [A type that is a model of __single_pass_range__.]]
- [[`a`] [Object of type X.]]
+ [[`X`] [A type that is a model of __single_pass_range__.\n
+ 符合 __single_pass_range__ 的一个类型。]]
+ [[`a`] [Object of type X.\n
+ 类型 X 的对象。]]
]
-[heading Description]
-
-A range `X` where `boost::range_iterator<X>::type` is a model of
__single_pass_iterator__.
-
-[heading Associated types]
+[heading Description 说明]
+
+A range `X` where `boost::range_iterator<X>::type` is a model of
__single_pass_iterator__.\n
+一个区间 `X`,其 `boost::range_iterator<X>::type` 为
__single_pass_iterator__ 的 model。
+
+[heading Associated types 关联类型]
[table
[]
- [[Iterator type ] [`boost::range_iterator<X>::type` ] [The
type of iterator used to iterate through a Range's elements. The iterator's
value type is expected to be the Range's value type. A conversion from the
iterator type to the `const` iterator type must exist.]]
- [[Const iterator type] [`boost::range_iterator<const X>::type`] [A type
of iterator that may be used to examine, but not to modify, a Range's
elements.]]
+ [[Iterator type \n迭代器类型 ]
[`boost::range_iterator<X>::type` ] [The type of iterator used to
iterate through a Range's elements. The iterator's value type is expected
to be the Range's value type. A conversion from the iterator type to the
`const` iterator type must exist.\n
+ 用于迭代区间中的元素的迭代器的类型。迭代器的 value type 应为区间的 value
type. 从该迭代器类型到 `const` 迭代器类型的转换必须存在。]]
+ [[Const iterator type\n常量迭代器类型] [`boost::range_iterator<const
X>::type`] [A type of iterator that may be used to examine, but not to
modify, a Range's elements.\n
+ 一个迭代器类型,该迭代器可用于检测但不可修改区间中的元素。]]
]
-[heading Valid expressions]
-
-The following expressions must be valid.
+[heading Valid expressions 有效表达式]
+
+The following expressions must be valid.\n
+以下表达式必须有效。
[table
- [[Name ] [Expression ] [Return type ]]
- [[Beginning of range] [`boost::begin(a)`]
[`boost::range_iterator<X>::type` if `a` is mutable,
`boost::range_iterator<const X>::type` otherwise]]
- [[End of range ] [`boost::end(a)` ]
[`boost::range_iterator<X>::type` if `a` is mutable,
`boost::range_iterator<const X>::type` otherwise]]
+ [[Name 名字] [Expression 表达式 ] [Return type 返回类型 ]]
+ [[Beginning of range\n区间的始端] [`boost::begin(a)`]
[`boost::range_iterator<X>::type` if `a` is mutable,
`boost::range_iterator<const X>::type` otherwise]]
+ [[End of range \n区间的末端 ] [`boost::end(a)` ]
[`boost::range_iterator<X>::type` if `a` is mutable,
`boost::range_iterator<const X>::type` otherwise]]
]
-[heading Expression semantics]
+[heading Expression semantics 表达式语义]
[table
- [[Expression ]
[Semantics ]
[Postcondition]]
- [[`boost::begin(a)`] [Returns an iterator pointing to the first element
in the Range. ] [`boost::begin(a)` is either dereferenceable or
past-the-end. It is past-the-end if and only if `boost::distance(a) == 0`.]]
- [[`boost::end(a)` ] [Returns an iterator pointing one past the last
element in the Range. ] [`boost::end(a)` is past-the-end.]]
+ [[Expression 表达式 ] [Semantics 语
义 ] [Postcondition 后验条件]]
+ [[`boost::begin(a)`] [Returns an iterator pointing to the first element
in the Range. \n
+ 返回一个迭代器,指向区间中的第一个元素] [`boost::begin(a)` is either
dereferenceable or past-the-end. It is past-the-end if and only if
`boost::distance(a) == 0`.\n
+ `boost::begin(a)` 是可提领的或是 past-the-end. 它是 past-the-end 当且仅
当 `boost::size(a) == 0`.]]
+ [[`boost::end(a)` ] [Returns an iterator pointing one past the last
element in the Range. \n
+ 返回一个迭代器,指向区间中的最后一个元素之后。] [`boost::end(a)` is
past-the-end.\n
+ `boost::end(a)` 为 past-the-end.]]
]
-[heading Complexity guarantees]
-
-`boost::end(a)` is at most amortized linear time, `boost::begin(a)` is
amortized constant time. For most practical purposes, one can expect both
to be amortized constant time.
-
-[heading Invariants]
+[heading Complexity guarantees 复杂度保证]
+
+`boost::end(a)` is at most amortized linear time, `boost::begin(a)` is
amortized constant time. For most practical purposes, one can expect both
to be amortized constant time.\n
+`boost::end(a)` 至多为分期线性时间,`boost::begin(a)` 为分期常量时间。大多
数情况下,你可以期望两个函数均为分期常量时间。
+
+[heading Invariants 不变式]
[table
[]
- [[Valid range ] [For any Range `a`, `[boost::begin(a),boost::end(a))` is
a valid range, that is, `boost::end(a)` is reachable from `boost::begin(a)`
in a finite number of increments.]]
-
- [[Completeness] [An algorithm that iterates through the range
`[boost::begin(a),boost::end(a))` will pass through every element of `a`.]]
+ [[Valid range \n有效区间] [For any Range `a`,
`[boost::begin(a),boost::end(a))` is a valid range, that is,
`boost::end(a)` is reachable from `boost::begin(a)` in a finite number of
increments.\n
+ 对于任意区间 `a`, `[boost::begin(a),boost::end(a))` 是一个有效区间,即
`boost::end(a)` 可以从 `boost::begin(a)`
+ 在经过有限次递增后到达。]]
+
+ [[Completeness\n完整性] [An algorithm that iterates through the range
`[boost::begin(a),boost::end(a))` will pass through every element of `a`.\n
+ 一个对区间 `[boost::begin(a),boost::end(a))` 进行迭代的算法将遍历 `a` 的
每一个元素。]]
]
-[heading See also]
+[heading See also 参见]
__extending_for_udts__
@@ -84,33 +110,38 @@
[endsect]
-[section Forward Range]
-
-[heading Notation]
+[section:forward_range Forward Range 前向区间]
+
+[heading Notation 符号]
[table
[]
- [[`X`] [A type that is a model of __forward_range__.]]
- [[`a`] [Object of type X.]]
+ [[`X`] [A type that is a model of __forward_range__.\n
+ 一个类型,__forward_range__ 的 model.]]
+ [[`a`] [Object of type X.\n
+ 类型 X 的对象]]
]
-[heading Description]
-
-A range `X` where `boost::range_iterator<X>::type` is a model of
__forward_traversal_iterator__.
-
-[heading Refinement of]
+[heading Description 说明]
+
+A range `X` where `boost::range_iterator<X>::type` is a model of
__forward_traversal_iterator__.\n
+区间 `X` 的 `boost::range_iterator<X>::type` 为
__forward_traversal_iterator__ 的 model.
+
+[heading Refinement of 强化自]
__single_pass_range__
-[heading Associated types]
+[heading Associated types 关联类型]
[table
[]
- [[Distance type] [`boost::range_difference<X>::type`] [A signed integral
type used to represent the distance between two of the Range's iterators.
This type must be the same as the iterator's distance type.]]
- [[Size type ] [`boost::range_size<X>::type` ] [An unsigned
integral type that can represent any nonnegative value of the Range's
distance type.]]
+ [[Distance type\n距离类型] [`boost::range_difference<X>::type`] [A
signed integral type used to represent the distance between two of the
Range's iterators. This type must be the same as the iterator's distance
type.\n
+ 一个有符号整数类型,用于表示两个区间迭代器间的距离。该类型必须与迭代器的
距离类型相同。]]
+ [[Size type\n大小类型] [`boost::range_size<X>::type` ] [An unsigned
integral type that can represent any nonnegative value of the Range's
distance type.\n
+ 一个无符号整数类型,可以表示区间距离类型的任意非负值。]]
]
-[heading See also]
+[heading See also 参见]
__implementation_of_metafunctions__
@@ -119,56 +150,69 @@
[endsect]
-[section Bidirectional Range]
-
-[heading Notation]
+[section:bidirectional_range Bidirectional Range 双向区间]
+
+[heading Notation 符号]
[table
[]
- [[`X`] [A type that is a model of __bidirectional_range__.]]
- [[`a`] [Object of type X.]]
+ [[`X`] [A type that is a model of __bidirectional_range__.\n
+ 一个类型,__bidirectional_range__ 的 model.]]
+ [[`a`] [Object of type X.\n
+ 类型 X 的对象。]]
]
-[heading Description]
-
-This concept provides access to iterators that traverse in both directions
(forward and reverse). The `boost::range_iterator<X>::type` iterator must
meet all of the requirements of __bidirectional_traversal_iterator__.
-
-[heading Refinement of]
+[heading Description 说明]
+
+This concept provides access to iterators that traverse in both directions
(forward and reverse). The `boost::range_iterator<X>::type` iterator must
meet all of the requirements of __bidirectional_traversal_iterator__.\n
+该概念提供了迭代器用于从两个方向(前向和后向)进行遍历。
+`boost::range_iterator<X>::type` 的迭代器必须满足
__bidirectional_traversal_iterator__ 的所有要求。
+
+[heading Refinement of 强化自]
__forward_range__
-[heading Associated types]
+[heading Associated types 关联类型]
[table
[]
- [[Reverse Iterator type ]
[`boost::range_reverse_iterator<X>::type` ] [The type of iterator used
to iterate through a Range's elements in reverse order. The iterator's
value type is expected to be the Range's value type. A conversion from the
reverse iterator type to the const reverse iterator type must exist.]]
-
- [[Const reverse iterator type] [`boost::range_reverse_iterator<const
X>::type`] [A type of reverse iterator that may be used to examine, but not
to modify, a Range's elements.]]
+ [[Reverse Iterator type\n反向迭代器类型]
[`boost::range_reverse_iterator<X>::type` ] [The type of iterator used
to iterate through a Range's elements in reverse order. The iterator's
value type is expected to be the Range's value type. A conversion from the
reverse iterator type to the const reverse iterator type must exist.\n
+ 用于对区间元素进行反向遍历的迭代器类型。该迭代器的值类型应为区间的值类
型。必须有从反向迭代器类型转为常量反向迭代器类型的转换。]]
+
+ [[Const reverse iterator type\n常量反向迭代器类型]
[`boost::range_reverse_iterator<const X>::type`] [A type of reverse
iterator that may be used to examine, but not to modify, a Range's
elements.\n
+ 一种可用于读出但不能修改某个区间元素的反向迭代器类型。]]
]
-[heading Valid expressions]
+[heading Valid expressions 有效表达式]
[table
- [[Name ] [Expression ] [Return type] [Semantics]]
- [[Beginning of range] [`boost::rbegin(a)`]
[`boost::range_reverse_iterator<X>::type` if `a` is mutable
`boost::range_reverse_iterator<const X>::type` otherwise.] [Equivalent to
`boost::range_reverse_iterator<X>::type(boost::end(a))`.]]
-
- [[End of range ] [`boost::rend(a)` ]
[`boost::range_reverse_iterator<X>::type` if `a` is mutable,
`boost::range_reverse_iterator<const X>::type` otherwise.] [Equivalent to
`boost::range_reverse_iterator<X>::type(boost::begin(a))`.]]
+ [[Name 名字 ] [Expression 表达式 ] [Return type 返回类
型] [Semantics 语义]]
+ [[Beginning of range\n区间始端] [`boost::rbegin(a)`]
[`boost::range_reverse_iterator<X>::type` if `a` is mutable
`boost::range_reverse_iterator<const X>::type` otherwise.] [Equivalent to
`boost::range_reverse_iterator<X>::type(boost::end(a))`.\n
+ 等同于 `boost::range_reverse_iterator<X>::type(boost::end(a))`.]]
+
+ [[End of range\n区间末端] [`boost::rend(a)` ]
[`boost::range_reverse_iterator<X>::type` if `a` is mutable,
`boost::range_reverse_iterator<const X>::type` otherwise.] [Equivalent to
`boost::range_reverse_iterator<X>::type(boost::begin(a))`.\n
+ 等同于 `boost::range_reverse_iterator<X>::type(boost::begin(a))`.]]
]
-[heading Complexity guarantees]
-
-`boost::rbegin(a)` has the same complexity as `boost::end(a)` and
`boost::rend(a)` has the same complexity as `boost::begin(a)` from
__forward_range__.
-
-[heading Invariants]
+[heading Complexity guarantees 复杂度保证]
+
+`boost::rbegin(a)` has the same complexity as `boost::end(a)` and
`boost::rend(a)` has the same complexity as `boost::begin(a)` from
__forward_range__.\n
+`boost::rbegin(a)` 具有与 __forward_range__ 的 `boost::end(a)` 相同的复杂
度,而 `boost::rend(a)`
+则具有与 `boost::begin(a)` 相同的复杂度。
+
+[heading Invariants 不变式]
[table
[]
- [[Valid reverse range] [For any Bidirectional Range a,
`[boost::rbegin(a),boost::rend(a))` is a valid range, that is,
`boost::rend(a)` is reachable from `boost::rbegin(a)` in a finite number of
increments.]]
-
- [[Completeness ] [An algorithm that iterates through the range
`[boost::rbegin(a),boost::rend(a))` will pass through every element of
`a`.]]
+ [[Valid reverse range\n有效反向区间] [For any Bidirectional Range a,
`[boost::rbegin(a),boost::rend(a))` is a valid range, that is,
`boost::rend(a)` is reachable from `boost::rbegin(a)` in a finite number of
increments.\n
+ 对于任意双向区间,`[boost::rbegin(a),boost::rend(a))` 是一个有效区间,即
`boost::rend(a)` 可以在有限次递增后从
+ `boost::rbegin(a)` 到达。]]
+
+ [[Completeness\n完整性] [An algorithm that iterates through the range
`[boost::rbegin(a),boost::rend(a))` will pass through every element of
`a`.\n
+ 对区间 `[boost::rbegin(a),boost::rend(a))` 进行迭代的算法将遍历 `a` 的每
一个元素。]]
]
-[heading See also]
+[heading See also 参见]
__implementation_of_metafunctions__
@@ -177,69 +221,82 @@
[endsect]
-[section Random Access Range]
-
-[heading Description]
-
-A range `X` where `boost::range_iterator<X>::type` is a model of
__random_access_traversal_iterator__.
-
-[heading Refinement of]
+[section:random_access_range Random Access Range 随机访问区间]
+
+[heading Description 说明]
+
+A range `X` where `boost::range_iterator<X>::type` is a model of
__random_access_traversal_iterator__.\n
+区间 `X` 的 `boost::range_iterator<X>::type` 为
__random_access_traversal_iterator__ 的 model.
+
+[heading Refinement of 强化自]
__bidirectional_range__
-[heading Valid expressions]
+[heading Valid expressions 有效表达式]
[table
- [[Name ] [Expression ] [Return type ]]
- [[Size of range] [`boost::size(a)`] [`boost::range_size<X>::type`]]
+ [[Name 名字] [Expression 表达式] [Return type 返回类型]]
+ [[Size of range\n区间大小] [`boost::size(a)`]
[`boost::range_size<X>::type`]]
]
-[heading Expression semantics]
+[heading Expression semantics 表达式语义]
[table
- [[Expression ] [Semantics] [Postcondition]]
- [[`boost::size(a)`] [Returns the size of the Range, that is, its number
of elements. Note `boost::size(a) == 0u` is equivalent to
`boost::empty(a)`.] [`boost::size(a) >= 0`]]
+ [[Expression 表达式] [Semantics 语义] [Postcondition 后验条件]]
+ [[`boost::size(a)`] [Returns the size of the Range, that is, its number
of elements. Note `boost::size(a) == 0u` is equivalent to
`boost::empty(a)`.\n
+ 返回区间的大小,即元素的数量。注意,`boost::size(a) == 0u` 等价于
`boost::empty(a)`.] [`boost::size(a) >= 0`]]
]
-[heading Complexity guarantees]
-
-`boost::size(a)` completes in amortized constant time.
-
-[heading Invariants]
+[heading Complexity guarantees 复杂度保证]
+
+`boost::size(a)` completes in amortized constant time.\n
+`boost::size(a)` 在常量时间内完成。
+
+[heading Invariants 不变式]
[table
[]
- [[Range size] [`boost::size(a)` is equal to the `boost::end(a)` -
`boost::begin(a)`.]]
+ [[Range size\n区间大小] [`boost::size(a)` is equal to the
`boost::end(a)` - `boost::begin(a)`.\n
+ `boost::size(a)` 等于 `boost::end(a)` - `boost::begin(a)`.]]
]
[endsect]
-[section Concept Checking]
-
-Each of the range concepts has a corresponding concept checking class in
the file [@../../boost/range/concepts.hpp `<boost/range/concepts.hpp>`].
These classes may be used in conjunction with the __concept_check__ to
ensure that the type of a template parameter is compatible with a range
concept. If not, a meaningful compile time error is generated. Checks are
provided for the range concepts related to iterator traversal categories.
For example, the following line checks that the type `T` models the
__forward_range__ concept.
+[section:concept_checking Concept Checking 概念检查]
+
+Each of the range concepts has a corresponding concept checking class in
the file [@../../boost/range/concepts.hpp `<boost/range/concepts.hpp>`].
These classes may be used in conjunction with the __concept_check__ to
ensure that the type of a template parameter is compatible with a range
concept. If not, a meaningful compile time error is generated. Checks are
provided for the range concepts related to iterator traversal categories.
For example, the following line checks that the type `T` models the
__forward_range__ concept.\n
+每一个区间概念都有一个对应的概念检查类在 [@../../boost/range/concepts.hpp
`<boost/range/concepts.hpp>`] 中。
+这些类可以和 __concept_check__ 一起使用,以确保模板参数的类型兼容于某个区间
概念。如果不兼容,则产生一个编译期错误。
+为区间概念所提供的检查是关于迭代器遍历类别的。例如,下面这行代码检查类型
`T` 是否符合 __forward_range__ 的概念。
``
BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<T> ));
``
-An additional concept check is required for the value access property of
the range based on the range's iterator type. For example to check for a
ForwardReadableRange, the following code is required.
+An additional concept check is required for the value access property of
the range based on the range's iterator type. For example to check for a
ForwardReadableRange, the following code is required.\n
+还有一个要进行的概念检查是针对区间所基于的区间迭代器类型的值访问属性。例如
检查一个前向可读区间,需要以下代码。
``
BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<T> ));
BOOST_CONCEPT_ASSERT(( ReadableIteratorConcept<typename
range_iterator<T>::type> ));
``
-The following range concept checking classes are provided.
-
-* Class SinglePassRangeConcept checks for __single_pass_range__
-* Class ForwardRangeConcept checks for __forward_range__
-* Class BidirectionalRangeConcept checks for __bidirectional_range__
-* Class RandomAccessRangeConcept checks for __random_access_range__
-
-[heading See also]
-
-[link range.style_guide Range Terminology and style guidelines]
+The following range concept checking classes are provided.\n
+本库提供了以下区间概念检查类:
+
+* Class SinglePassRangeConcept checks for __single_pass_range__\n
+ 类 SinglePassRangeConcept 用于检查 __single_pass_range__
+* Class ForwardRangeConcept checks for __forward_range__\n
+ 类 ForwardRangeConcept 用于检查 __forward_range__
+* Class BidirectionalRangeConcept checks for __bidirectional_range__\n
+ 类 BidirectionalRangeConcept 用于检查 __bidirectional_range__
+* Class RandomAccessRangeConcept checks for __random_access_range__\n
+ 类 RandomAccessRangeConcept 用于检查 __random_access_range__
+
+[heading See also 参见]
+
+[link range.style_guide Range Terminology and style guidelines 区间的术语及
风格]
__iterator_concepts__
=======================================
--- /trunk/libs/range/doc/examples.qbk Mon May 31 00:54:22 2010
+++ /trunk/libs/range/doc/examples.qbk Tue Jun 22 21:13:43 2010
@@ -1,10 +1,14 @@
-[section Examples]
-
-Some examples are given in the accompanying test files:
-
-* [@http://www.boost.org/libs/range/test/string.cpp string.cpp] shows how
to implement a container version of `std::find()` that works with
`char[]`,`wchar_t[]`,`char*`,`wchar_t*`.
-
-* [@http://www.boost.org/libs/range/test/algorithm_example.cpp
algorithm_example.cpp] shows the replace example from the introduction.
+[section:examples Examples 示例]
+
+Some examples are given in the accompanying test files:\n
+在随附的测试文件中给出了一些例子:
+
+* [@http://www.boost.org/libs/range/test/string.cpp string.cpp] shows how
to implement a container version of `std::find()` that works with
`char[]`,`wchar_t[]`,`char*`,`wchar_t*`.\n
+ [@http://www.boost.org/libs/range/test/string.cpp string.cpp] 示范如何实
例一个容器版本的 `std::find()`,可用于
+ `char[]`,`wchar_t[]`,`char*`,`wchar_t*`.
+
+* [@http://www.boost.org/libs/range/test/algorithm_example.cpp
algorithm_example.cpp] shows the replace example from the introduction.\n
+ [@http://www.boost.org/libs/range/test/algorithm_example.cpp
algorithm_example.cpp] 示范"简介"一节中的 replace 例子。
* [@http://www.boost.org/libs/range/test/iterator_range.cpp
iterator_range.cpp]
=======================================
--- /trunk/libs/range/doc/faq.qbk Mon May 31 00:54:22 2010
+++ /trunk/libs/range/doc/faq.qbk Tue Jun 22 21:13:43 2010
@@ -1,24 +1,35 @@
[section FAQ]
-1. ['[*Why is there no difference between `range_iterator<C>::type` and
`range_const_iterator<C>::type` for `std::pair<iterator, iterator>`?]]
-
-[:In general it is not possible nor desirable to find a corresponding
`const_iterator`. When it is possible to come up with one, the client might
choose to construct a `std::pair<const_iterator,const_iterator>` object.]
-
-[:Note that an __iterator_range__ is somewhat more convenient than a
`pair` and that a __sub_range__ does propagate const-ness.]
-
-2. ['[*Why is there not supplied more types or more functions?]]
-
-[:The library has been kept small because its current interface will serve
most purposes. If and when a genuine need arises for more functionality, it
can be implemented.]
-
-3. ['[*How should I implement generic algorithms for ranges?]]
-
-[:One should always start with a generic algorithm that takes two
iterators (or more) as input. Then use Boost.Range to build handier
versions on top of the iterator based algorithm. Please notice that once
the range version of the algorithm is done, it makes sense not to expose
the iterator version in the public interface.]
-
-4. ['[*Why is there no Incrementable Range concept?]]
-
-[:Even though we speak of incrementable iterators, it would not make much
sense for ranges; for example, we cannot determine the size and emptiness
of a range since we cannot even compare its iterators.]
-
-[:Note also that incrementable iterators are derived from output iterators
and so there exist no output range.]
+1. ['[*Why is there no difference between `range_iterator<C>::type` and
`range_const_iterator<C>::type` for `std::pair<iterator, iterator>`?\n
+为什么对于 `std::pair<iterator, iterator>`,`range_iterator<C>::type` 和
`range_const_iterator<C>::type` 没有区别。]]
+
+[:In general it is not possible nor desirable to find a corresponding
`const_iterator`. When it is possible to come up with one, the client might
choose to construct a `std::pair<const_iterator,const_iterator>` object.\n
+通常没有可能也不值得找到一个 `const_iterator`. 如果要得到一个,用户可以选择
构造一个 `std::pair<const_iterator,const_iterator>` 对象。]
+
+[:Note that an __iterator_range__ is somewhat more convenient than a
`pair` and that a __sub_range__ does propagate const-ness.\n
+注意,__iterator_range__ 要比 `pair` 稍微方便一点,而 __sub_range__ 则可以
传播常量性。]
+
+2. ['[*Why is there not supplied more types or more functions?\n
+为什么不提供更多的类型或函数?]]
+
+[:The library has been kept small because its current interface will serve
most purposes. If and when a genuine need arises for more functionality, it
can be implemented.\n
+本库保持比较小是因为它当前的接口可以有更多的用途。如果真的需要更多的功
能,它也可以实现。]
+
+3. ['[*How should I implement generic algorithms for ranges?\n
+我如何实现使用区间的泛型算法?]]
+
+[:One should always start with a generic algorithm that takes two
iterators (or more) as input. Then use Boost.Range to build handier
versions on top of the iterator based algorithm. Please notice that once
the range version of the algorithm is done, it makes sense not to expose
the iterator version in the public interface.\n
+你应该从接受两个(或多个)迭代器作为输入的泛型算法开始。然后使用 Boost.Range
在算法所基于的迭代器之上来构建一个手工版本。
+请注意,一旦实现了算法的区间版本,就不要再将迭代器版本公开在公有接口上。]
+
+4. ['[*Why is there no Incrementable Range concept?\n
+为什么没有递增区间的概念?]]
+
+[:Even though we speak of incrementable iterators, it would not make much
sense for ranges; for example, we cannot determine the size and emptiness
of a range since we cannot even compare its iterators.\n
+虽然我们有讨论递增迭代器,但是不太合适讨论这类区间;例如,我们无法确定区间
的大小以及区间是否为空,因为我们不能比较这种迭代器。]
+
+[:Note also that incrementable iterators are derived from output iterators
and so there exist no output range.\n
+还应注意,递增迭代器派生自输出迭代器,所以也不存在输出区间。]
[endsect]
=======================================
--- /trunk/libs/range/doc/headers.qbk Mon May 31 00:54:22 2010
+++ /trunk/libs/range/doc/headers.qbk Tue Jun 22 21:13:43 2010
@@ -1,11 +1,14 @@
-[section Library Headers]
-
-[section General]
+[section:library_headers Library Headers 头文件]
+
+[section:general General 概述]
[table
- [[Header ] [Includes ]
[Related Concept ]]
- [[`<boost/range.hpp>` ] [everything from Boost.Range
version 1 (Boost versions 1.42 and below). Includes the core range
functions and metafunctinos, but excludes Range Adaptors and Range
Algorithms. ] [- ]]
- [[`<boost/range/metafunctions.hpp>` ] [every metafunction ]
[- ]]
- [[`<boost/range/functions.hpp>` ] [every function ]
[- ]]
+ [[Header 头文件] [Includes 包含] [Related Concept 相关概念]]
+ [[`<boost/range.hpp>` ] [everything from Boost.Range
version 1 (Boost versions 1.42 and below). Includes the core range
functions and metafunctinos, but excludes Range Adaptors and Range
Algorithms. \n
+ Boost.Range 版本1(Boost versions 1.42 及之前)的所有内容。包括核心的区间
函数和元函数,但不包括区间适配器和区间算法] [-]]
+ [[`<boost/range/metafunctions.hpp>` ] [every metafunction \n
+ 所有元函数] [- ]]
+ [[`<boost/range/functions.hpp>` ] [every function \n
+ 所有函数] [- ]]
[[`<boost/range/value_type.hpp>` ] [__range_value__ ]
[__single_pass_range__ ]]
[[`<boost/range/iterator.hpp>` ] [__range_iterator__ ]
[__single_pass_range__ ]]
[[`<boost/range/difference_type.hpp>` ] [__range_difference__ ]
[__forward_range__ ]]
@@ -24,9 +27,12 @@
[[`<boost/range/iterator_range.hpp>` ] [__iterator_range__ ]
[- ]]
[[`<boost/range/sub_range.hpp>` ] [__sub_range__ ]
[- ]]
[[`<boost/range/concepts.hpp>` ] [__range_concepts__ ]
[- ]]
- [[`<boost/range/adaptors.hpp>` ] [every range adaptor ]
[- ]]
- [[`<boost/range/algorithm.hpp>` ] [every range equivalent of an
STL algorithm ] [- ]]
- [[`<boost/range/algorithm_ext.hpp>` ] [every range algorithm that is
an extension of the STL algorithms ] [- ]]
+ [[`<boost/range/adaptors.hpp>` ] [every range adaptor \n
+ 所有区间适配器] [- ]]
+ [[`<boost/range/algorithm.hpp>` ] [every range equivalent of an
STL algorithm \n
+ 所有与STL算法等效的区间算法] [- ]]
+ [[`<boost/range/algorithm_ext.hpp>` ] [every range algorithm that is
an extension of the STL algorithms \n
+ 所有作为STL算法扩展的区间算法] [- ]]
[[`<boost/range/counting_range.hpp>` ] [ __counting_range__ ] [-]]
[[`<boost/range/istream_range.hpp>` ] [ __istream_range__ ] [-]]
[[`<boost/range/irange.hpp>` ] [ __irange__ ] [-]]
@@ -34,9 +40,9 @@
]
[endsect]
-[section Adaptors]
+[section:adaptors Adaptors 适配器]
[table
- [[Header
][Includes ]]
+ [[Header 头文件][Includes 包含]]
[[`<boost/range/adaptor/adjacent_filtered.hpp>`]
[__range_adaptors_adjacent_filtered__ ]]
[[`<boost/range/adaptor/copied.hpp>`]
[__range_adaptors_copied__]]
[[`<boost/range/adaptor/filtered.hpp>`]
[__range_adaptors_filtered__]]
@@ -54,9 +60,9 @@
]
[endsect]
-[section Algorithm]
+[section:algorithm Algorithm 算法]
[table
- [[Header
][Includes ]]
+ [[Header 头文件][Includes 包含]]
[[`<boost/range/algorithm/adjacent_find.hpp>`]
[__range_algorithms_adjacent_find__]]
[[`<boost/range/algorithm/binary_search.hpp>`]
[__range_algorithms_binary_search__]]
[[`<boost/range/algorithm/copy.hpp>`]
[__range_algorithms_copy__]]
@@ -119,9 +125,9 @@
]
[endsect]
-[section Algorithm Extensions]
+[section:algorithm_extensions Algorithm Extensions 算法扩展]
[table
- [[Header
][Includes ]]
+ [[Header 头文件][Includes 包含]]
[[`<boost/range/algorithm_ext/copy_n.hpp>`]
[__range_algorithm_ext_copy_n__]]
[[`<boost/range/algorithm_ext/erase.hpp>`]
[__range_algorithm_ext_erase__]]
[[`<boost/range/algorithm_ext/for_each.hpp>`]
[__range_algorithm_ext_for_each__]]
=======================================
--- /trunk/libs/range/doc/history_ack.qbk Mon May 31 00:54:22 2010
+++ /trunk/libs/range/doc/history_ack.qbk Tue Jun 22 21:13:43 2010
@@ -1,4 +1,4 @@
-[section:history_ack History and Acknowledgement]
+[section:history_ack History and Acknowledgement 历史和鸣谢]
[heading Version 1 - before Boost 1.43]
The library have been under way for a long time. Dietmar Kühl originally
intended to submit an `array_traits` class template which had most of the
functionality present now, but only for arrays and standard containers.
=======================================
--- /trunk/libs/range/doc/html/index.html Mon May 31 00:54:22 2010
+++ /trunk/libs/range/doc/html/index.html Tue Jun 22 21:13:43 2010
@@ -3,9 +3,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Chapter 1. Range 2.0</title>
<link rel="stylesheet" href="../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="index.html" title="Chapter 1. Range 2.0">
-<link rel="next" href="range/introduction.html" title="Introduction">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="Chapter 1. Range 2.0">
+<link rel="next" href="range/introduction.html" title="Introduction
简介">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -18,7 +18,7 @@
</tr></table>
<hr>
<div class="spirit-nav"><a accesskey="n"
href="range/introduction.html"><img
src="../../../../doc/html/images/next.png" alt="Next"></a></div>
-<div class="chapter" title="Chapter 1. Range 2.0">
+<div class="chapter" lang="en">
<div class="titlepage"><div>
<div><h2 class="title">
<a name="range"></a>Chapter 1. Range 2.0</h2></div>
@@ -29,8 +29,8 @@
<span class="firstname">Neil</span> <span class="surname">Groves</span>
</h3></div></div>
<div><p class="copyright">Copyright © 2003 -2010 Thorsten Ottosen,
Neil Groves</p></div>
-<div><div class="legalnotice" title="Legal Notice">
-<a name="id2680258"></a><p>
+<div><div class="legalnotice">
+<a name="id4850304"></a><p>
Distributed under the Boost Software License, Version 1.0. (See
accompanying
file LICENSE_1_0.txt or copy at <a
href="http://www.boost.org/LICENSE_1_0.txt"
target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
@@ -39,110 +39,119 @@
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="section"><a
href="range/introduction.html">Introduction</a></span></dt>
-<dt><span class="section"><a href="range/concepts.html"> Range
Concepts</a></span></dt>
+<dt><span class="section"><a href="range/introduction.html"> Introduction
简介</a></span></dt>
+<dt><span class="section"><a href="range/concepts.html"> Range Concepts
Range概念</a></span></dt>
<dd><dl>
-<dt><span class="section"><a
href="range/concepts/overview.html">Overview</a></span></dt>
-<dt><span class="section"><a
href="range/concepts/single_pass_range.html">Single Pass
Range</a></span></dt>
-<dt><span class="section"><a
href="range/concepts/forward_range.html">Forward Range</a></span></dt>
-<dt><span class="section"><a
href="range/concepts/bidirectional_range.html">Bidirectional
Range</a></span></dt>
-<dt><span class="section"><a
href="range/concepts/random_access_range.html">Random Access
Range</a></span></dt>
-<dt><span class="section"><a
href="range/concepts/concept_checking.html">Concept Checking</a></span></dt>
+<dt><span class="section"><a href="range/concepts/overview.html"> Overview
简介</a></span></dt>
+<dt><span class="section"><a href="range/concepts/single_pass_range.html">
Single Pass Range
+ 单遍区间</a></span></dt>
+<dt><span class="section"><a href="range/concepts/forward_range.html">
Forward Range 前向区间</a></span></dt>
+<dt><span class="section"><a
href="range/concepts/bidirectional_range.html"> Bidirectional Range
+ 双向区间</a></span></dt>
+<dt><span class="section"><a
href="range/concepts/random_access_range.html"> Random Access Range
+ 随机访问区间</a></span></dt>
+<dt><span class="section"><a href="range/concepts/concept_checking.html">
Concept Checking 概念检查</a></span></dt>
</dl></dd>
-<dt><span class="section"><a href="range/reference.html">
Reference</a></span></dt>
+<dt><span class="section"><a href="range/reference.html"> Reference
参考手册</a></span></dt>
<dd><dl>
-<dt><span class="section"><a
href="range/reference/overview.html">Overview</a></span></dt>
+<dt><span class="section"><a href="range/reference/overview.html">
Overview 简介</a></span></dt>
<dt><span class="section"><a
href="range/reference/concept_implementation.html"> Range concept
- implementation</a></span></dt>
+ implementation
区间概念的实现</a></span></dt>
<dd><dl>
-<dt><span class="section"><a
href="range/reference/concept_implementation/synopsis.html">Synopsis</a></span></dt>
-<dt><span class="section"><a
href="range/reference/concept_implementation/semantics.html">Semantics</a></span></dt>
+<dt><span class="section"><a
href="range/reference/concept_implementation/synopsis.html"> Synopsis
+ 概要</a></span></dt>
+<dt><span class="section"><a
href="range/reference/concept_implementation/semantics.html">
+ Semantics 语义</a></span></dt>
</dl></dd>
-<dt><span class="section"><a href="range/reference/adaptors.html"> Range
Adaptors</a></span></dt>
+<dt><span class="section"><a href="range/reference/adaptors.html"> Range
Adaptors 区间适配器</a></span></dt>
<dd><dl>
<dt><span class="section"><a
href="range/reference/adaptors/introduction.html"> Introduction
- and motivation</a></span></dt>
+ and motivation
介绍与动机</a></span></dt>
<dt><span class="section"><a
href="range/reference/adaptors/general_requirements.html"> General
- Requirements</a></span></dt>
-<dt><span class="section"><a
href="range/reference/adaptors/reference.html"> Reference</a></span></dt>
+ Requirements 基本要求</a></span></dt>
+<dt><span class="section"><a
href="range/reference/adaptors/reference.html"> Reference
参考手册</a></span></dt>
</dl></dd>
-<dt><span class="section"><a href="range/reference/algorithms.html"> Range
Algorithm</a></span></dt>
+<dt><span class="section"><a href="range/reference/algorithms.html"> Range
Algorithm 区间算法</a></span></dt>
<dd><dl>
<dt><span class="section"><a
href="range/reference/algorithms/range_algorithm_introduction.html">
- Introduction and motivation</a></span></dt>
-<dt><span class="section"><a
href="range/reference/algorithms/mutating.html"> Mutating
algorithms</a></span></dt>
+ Introduction and motivation
介绍与动机</a></span></dt>
+<dt><span class="section"><a
href="range/reference/algorithms/mutating.html"> Mutating algorithms
+ 可写算法</a></span></dt>
<dt><span class="section"><a
href="range/reference/algorithms/non_mutating.html"> Non-mutating
- algorithms</a></span></dt>
-<dt><span class="section"><a href="range/reference/algorithms/set.html">
Set algorithms</a></span></dt>
-<dt><span class="section"><a href="range/reference/algorithms/heap.html">
Heap algorithms</a></span></dt>
+ algorithms 只读算法</a></span></dt>
+<dt><span class="section"><a href="range/reference/algorithms/set.html">
Set algorithms 集合算法</a></span></dt>
+<dt><span class="section"><a href="range/reference/algorithms/heap.html">
Heap algorithms 堆算法</a></span></dt>
<dt><span class="section"><a
href="range/reference/algorithms/permutation.html"> Permutation
- algorithms</a></span></dt>
-<dt><span class="section"><a href="range/reference/algorithms/new.html">
New algorithms</a></span></dt>
-<dt><span class="section"><a
href="range/reference/algorithms/numeric.html"> Numeric
algorithms</a></span></dt>
+ algorithms 排列算法</a></span></dt>
+<dt><span class="section"><a href="range/reference/algorithms/new.html">
New algorithms 新算法</a></span></dt>
+<dt><span class="section"><a
href="range/reference/algorithms/numeric.html"> Numeric algorithms
+ 数字算法</a></span></dt>
</dl></dd>
-<dt><span class="section"><a href="range/reference/ranges.html"> Provided
Ranges</a></span></dt>
+<dt><span class="section"><a href="range/reference/ranges.html"> Provided
Ranges 已提供的区间</a></span></dt>
<dd><dl>
<dt><span class="section"><a
href="range/reference/ranges/counting_range.html">
counting_range</a></span></dt>
<dt><span class="section"><a
href="range/reference/ranges/istream_range.html">
istream_range</a></span></dt>
<dt><span class="section"><a href="range/reference/ranges/irange.html">
irange</a></span></dt>
</dl></dd>
-<dt><span class="section"><a href="range/reference/utilities.html">
Utilities</a></span></dt>
+<dt><span class="section"><a href="range/reference/utilities.html">
Utilities 工具</a></span></dt>
<dd><dl>
<dt><span class="section"><a
href="range/reference/utilities/iterator_range.html"> Class <code
class="computeroutput"><span
class="identifier">iterator_range</span></code></a></span></dt>
<dt><span class="section"><a
href="range/reference/utilities/sub_range.html"> Class <code
class="computeroutput"><span
class="identifier">sub_range</span></code></a></span></dt>
<dt><span class="section"><a href="range/reference/utilities/join.html">
Function join</a></span></dt>
</dl></dd>
-<dt><span class="section"><a href="range/reference/extending.html">
Extending the library</a></span></dt>
+<dt><span class="section"><a href="range/reference/extending.html">
Extending the library 扩展本库</a></span></dt>
<dd><dl>
<dt><span class="section"><a
href="range/reference/extending/method_1.html"> Method 1: provide
- member functions and nested types</a></span></dt>
+ member functions and nested types 方法 1:
提供成员函数和嵌套类型</a></span></dt>
<dt><span class="section"><a
href="range/reference/extending/method_2.html"> Method 2: provide
- free-standing functions and specialize
metafunctions</a></span></dt>
+ free-standing functions and specialize metafunctions
方法 2:
提供独立函数和特化的元函数</a></span></dt>
<dt><span class="section"><a
href="range/reference/extending/method_3.html"> Method 3: provide
- range adaptor implementations</a></span></dt>
+ range adaptor implementations
方法3:提供区间适配器实现</a></span></dt>
</dl></dd>
</dl></dd>
-<dt><span class="section"><a href="range/style_guide.html"> Terminology
and style guidelines</a></span></dt>
-<dt><span class="section"><a href="range/library_headers.html">Library
Headers</a></span></dt>
+<dt><span class="section"><a href="range/style_guide.html"> Terminology
and style guidelines
术语与风格指导</a></span></dt>
+<dt><span class="section"><a href="range/library_headers.html"> Library
Headers 头文件</a></span></dt>
<dd><dl>
-<dt><span class="section"><a
href="range/library_headers/general.html">General</a></span></dt>
-<dt><span class="section"><a
href="range/library_headers/adaptors.html">Adaptors</a></span></dt>
-<dt><span class="section"><a
href="range/library_headers/algorithm.html">Algorithm</a></span></dt>
-<dt><span class="section"><a
href="range/library_headers/algorithm_extensions.html">Algorithm
- Extensions</a></span></dt>
+<dt><span class="section"><a href="range/library_headers/general.html">
General 概述</a></span></dt>
+<dt><span class="section"><a href="range/library_headers/adaptors.html">
Adaptors 适配器</a></span></dt>
+<dt><span class="section"><a href="range/library_headers/algorithm.html">
Algorithm 算法</a></span></dt>
+<dt><span class="section"><a
href="range/library_headers/algorithm_extensions.html"> Algorithm
+ Extensions 算法扩展</a></span></dt>
</dl></dd>
-<dt><span class="section"><a
href="range/examples.html">Examples</a></span></dt>
-<dt><span class="section"><a href="range/mfc_atl.html"> MFC/ATL (courtesy
of Shunsuke Sogame)</a></span></dt>
+<dt><span class="section"><a href="range/examples.html"> Examples
示例</a></span></dt>
+<dt><span class="section"><a href="range/mfc_atl.html"> MFC/ATL (courtesy
of Shunsuke Sogame 由
+ Shunsuke Sogame 贡献)</a></span></dt>
<dd><dl>
-<dt><span class="section"><a href="range/mfc_atl/requirements.html">
Requirements</a></span></dt>
-<dt><span class="section"><a href="range/mfc_atl/mfc_ranges.html"> MFC
Ranges</a></span></dt>
-<dt><span class="section"><a href="range/mfc_atl/atl_ranges.html"> ATL
Ranges</a></span></dt>
-<dt><span class="section"><a href="range/mfc_atl/const_ranges.html"> const
Ranges</a></span></dt>
-<dt><span class="section"><a href="range/mfc_atl/references.html">
References</a></span></dt>
+<dt><span class="section"><a href="range/mfc_atl/requirements.html">
Requirements 要求</a></span></dt>
+<dt><span class="section"><a href="range/mfc_atl/mfc_ranges.html"> MFC
Ranges MFC区间</a></span></dt>
+<dt><span class="section"><a href="range/mfc_atl/atl_ranges.html"> ATL
Ranges ATL区间</a></span></dt>
+<dt><span class="section"><a href="range/mfc_atl/const_ranges.html"> const
Ranges 常量区间</a></span></dt>
+<dt><span class="section"><a href="range/mfc_atl/references.html">
References 参考</a></span></dt>
</dl></dd>
-<dt><span class="section"><a href="range/upgrade.html"> Upgrade version of
Boost.Range</a></span></dt>
+<dt><span class="section"><a href="range/upgrade.html"> Upgrade version of
Boost.Range
Boost.Range的升级版本</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="range/upgrade/upgrade_from_1_42.html">
Upgrade from version
- 1.42</a></span></dt>
+ 1.42 从版本1.42升级</a></span></dt>
<dt><span class="section"><a href="range/upgrade/upgrade_from_1_34.html">
Upgrade from version
- 1.34</a></span></dt>
+ 1.34 从版本1.34升级</a></span></dt>
</dl></dd>
-<dt><span class="section"><a
href="range/portability.html">Portability</a></span></dt>
+<dt><span class="section"><a href="range/portability.html"> Portability
可移植性</a></span></dt>
<dt><span class="section"><a href="range/faq.html">FAQ</a></span></dt>
-<dt><span class="section"><a href="range/history_ack.html"> History and
Acknowledgement</a></span></dt>
+<dt><span class="section"><a href="range/history_ack.html"> History and
Acknowledgement 历史和鸣谢</a></span></dt>
</dl>
</div>
<p>
Boost.Range is a collection of concepts and utilities, range-based
algorithms,
- as well as range adaptors that allow for efficient and expressive code.
+ as well as range adaptors that allow for efficient and expressive
code.<br>
+ Boost.Range
是一组概念及工具、基于区间的算法,以及可实现高效且易读代码的区间适配器。
</p>
<p>
Using Boost.Range inplace of the standard library alternatives results
in more
- readable code and in many cases greater efficiency.
+ readable code and in many cases greater efficiency.<br> 用
Boost.Range
替代标准库中的相应工具可以写出更具可读性的代码,而且在多数情况下更为高效。
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
width="100%"><tr>
-<td align="left"><p><small>Last revised: April 28, 2010 at 17:51:33
GMT</small></p></td>
+<td align="left"><p><small>Last revised: June 23, 2010 at 03:11:25
GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
=======================================
--- /trunk/libs/range/doc/html/range/concepts/bidirectional_range.html Mon
May 31 00:54:22 2010
+++ /trunk/libs/range/doc/html/range/concepts/bidirectional_range.html Tue
Jun 22 21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Bidirectional Range</title>
+<title>Bidirectional Range 双向区间</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../index.html" title="Chapter 1. Range
2.0">
-<link rel="up" href="../concepts.html" title="Range Concepts">
-<link rel="prev" href="forward_range.html" title="Forward Range">
-<link rel="next" href="random_access_range.html" title="Random Access
Range">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../concepts.html" title="Range Concepts
Range概念">
+<link rel="prev" href="forward_range.html" title="Forward Range
前向区间">
+<link rel="next" href="random_access_range.html" title="Random Access
Range 随机访问区间">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,13 +22,15 @@
<div class="spirit-nav">
<a accesskey="p" href="forward_range.html"><img
src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../concepts.html"><img
src="../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../index.html"><img
src="../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="random_access_range.html"><img
src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Bidirectional Range">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="range.concepts.bidirectional_range"></a><a class="link"
href="bidirectional_range.html" title="Bidirectional Range">Bidirectional
Range</a>
+<a name="range.concepts.bidirectional_range"></a><a class="link"
href="bidirectional_range.html" title="Bidirectional Range
双向区间"> Bidirectional Range
+ 双向区间</a>
</h3></div></div></div>
-<a name="range.concepts.bidirectional_range.notation"></a><h5>
-<a name="id2692676"></a>
- <a class="link"
href="bidirectional_range.html#range.concepts.bidirectional_range.notation">Notation</a>
+<a name="range.concepts.bidirectional_range.notation_______"></a><h5>
+<a name="id4861576"></a>
+ <a class="link"
href="bidirectional_range.html#range.concepts.bidirectional_range.notation_______">Notation
+ 符号</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
@@ -45,8 +47,9 @@
</td>
<td>
<p>
- A type that is a model of <a class="link"
href="bidirectional_range.html" title="Bidirectional Range">Bidirectional
- Range</a>.
+ A type that is a model of <a class="link"
href="bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
+ Range</a>.<br>
一个类型,<a class="link"
href="bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
+ Range</a> 的 model.
</p>
</td>
</tr>
@@ -58,34 +61,37 @@
</td>
<td>
<p>
- Object of type X.
+ Object of type X.<br> 类型 X
的对象。
</p>
</td>
</tr>
</tbody>
</table></div>
-<a name="range.concepts.bidirectional_range.description"></a><h5>
-<a name="id2692774"></a>
- <a class="link"
href="bidirectional_range.html#range.concepts.bidirectional_range.description">Description</a>
+<a name="range.concepts.bidirectional_range.description_______"></a><h5>
+<a name="id4861688"></a>
+ <a class="link"
href="bidirectional_range.html#range.concepts.bidirectional_range.description_______">Description
+ 说明</a>
</h5>
<p>
This concept provides access to iterators that traverse in both
directions
(forward and reverse). The <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">range_iterator</span><span
class="special"><</span><span class="identifier">X</span><span
class="special">>::</span><span class="identifier">type</span></code>
iterator must meet all of the requirements
of <a
href="../../../../../../libs/iterator/doc/new-iter-concepts.html#bidirectional-traversal-iterators-lib-bidirectional-traversal-iterators"
target="_top">Bidirectional
- Traversal Iterator</a>.
+ Traversal Iterator</a>.<br>
该概念提供了迭代器用于从两个方向(前向和后向)进行遍历。
+ <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">range_iterator</span><span
class="special"><</span><span class="identifier">X</span><span
class="special">>::</span><span class="identifier">type</span></code>
的迭代器必须满足 <a
href="../../../../../../libs/iterator/doc/new-iter-concepts.html#bidirectional-traversal-iterators-lib-bidirectional-traversal-iterators"
target="_top">Bidirectional
+ Traversal Iterator</a>
的所有要求。
</p>
-<a name="range.concepts.bidirectional_range.refinement_of"></a><h5>
-<a name="id2692840"></a>
- <a class="link"
href="bidirectional_range.html#range.concepts.bidirectional_range.refinement_of">Refinement
- of</a>
+<a
name="range.concepts.bidirectional_range.refinement_of__________"></a><h5>
+<a name="id4861805"></a>
+ <a class="link"
href="bidirectional_range.html#range.concepts.bidirectional_range.refinement_of__________">Refinement
+ of 强化自</a>
</h5>
<p>
- <a class="link" href="forward_range.html" title="Forward
Range">Forward Range</a>
+ <a class="link" href="forward_range.html" title="Forward Range
前向区间">Forward Range</a>
</p>
-<a name="range.concepts.bidirectional_range.associated_types"></a><h5>
-<a name="id2692868"></a>
- <a class="link"
href="bidirectional_range.html#range.concepts.bidirectional_range.associated_types">Associated
- types</a>
+<a
name="range.concepts.bidirectional_range.associated_types_____________"></a><h5>
+<a name="id4861836"></a>
+ <a class="link"
href="bidirectional_range.html#range.concepts.bidirectional_range.associated_types_____________">Associated
+ types 关联类型</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
@@ -98,7 +104,7 @@
<tr>
<td>
<p>
- Reverse Iterator type
+ Reverse Iterator type<br>
反向迭代器类型
</p>
</td>
<td>
@@ -111,14 +117,14 @@
The type of iterator used to iterate through a Range's
elements
in reverse order. The iterator's value type is expected
to be the
Range's value type. A conversion from the reverse
iterator type
- to the const reverse iterator type must exist.
+ to the const reverse iterator type must exist.<br>
用于对区间元素进行反向遍历的迭代器类型。该迭代器的值类型应为区间的值类型。必须有从反向迭代器类型转为常量反向迭代器类型的转换。
</p>
</td>
</tr>
<tr>
<td>
<p>
- Const reverse iterator type
+ Const reverse iterator type<br>
常量反向迭代器类型
</p>
</td>
<td>
@@ -129,16 +135,16 @@
<td>
<p>
A type of reverse iterator that may be used to examine,
but not
- to modify, a Range's elements.
+ to modify, a Range's elements.<br>
一种可用于读出但不能修改某个区间元素的反向迭代器类型。
</p>
</td>
</tr>
</tbody>
</table></div>
-<a name="range.concepts.bidirectional_range.valid_expressions"></a><h5>
-<a name="id2693034"></a>
- <a class="link"
href="bidirectional_range.html#range.concepts.bidirectional_range.valid_expressions">Valid
- expressions</a>
+<a
name="range.concepts.bidirectional_range.valid_expressions________________"></a><h5>
+<a name="id4862026"></a>
+ <a class="link"
href="bidirectional_range.html#range.concepts.bidirectional_range.valid_expressions________________">Valid
+ expressions 有效表达式</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
@@ -150,22 +156,22 @@
<thead><tr>
<th>
<p>
- Name
+ Name 名字
</p>
</th>
<th>
<p>
- Expression
+ Expression 表达式
</p>
</th>
<th>
<p>
- Return type
+ Return type 返回类型
</p>
</th>
<th>
<p>
- Semantics
+ Semantics 语义
</p>
</th>
</tr></thead>
@@ -173,7 +179,7 @@
<tr>
<td>
<p>
- Beginning of range
+ Beginning of range<br> 区间始端
</p>
</td>
<td>
@@ -190,14 +196,14 @@
</td>
<td>
<p>
- Equivalent to <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">range_reverse_iterator</span><span
class="special"><</span><span class="identifier">X</span><span
class="special">>::</span><span class="identifier">type</span><span
class="special">(</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">end</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">))</span></code>.
+ Equivalent to <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">range_reverse_iterator</span><span
class="special"><</span><span class="identifier">X</span><span
class="special">>::</span><span class="identifier">type</span><span
class="special">(</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">end</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">))</span></code>.<br> 等同于 <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span
class="identifier">range_reverse_iterator</span><span
class="special"><</span><span class="identifier">X</span><span
class="special">>::</span><span class="identifier">type</span><span
class="special">(</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">end</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">))</span></code>.
</p>
</td>
</tr>
<tr>
<td>
<p>
- End of range
+ End of range<br> 区间末端
</p>
</td>
<td>
@@ -214,26 +220,30 @@
</td>
<td>
<p>
- Equivalent to <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">range_reverse_iterator</span><span
class="special"><</span><span class="identifier">X</span><span
class="special">>::</span><span class="identifier">type</span><span
class="special">(</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">begin</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">))</span></code>.
+ Equivalent to <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">range_reverse_iterator</span><span
class="special"><</span><span class="identifier">X</span><span
class="special">>::</span><span class="identifier">type</span><span
class="special">(</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">begin</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">))</span></code>.<br> 等同于 <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span
class="identifier">range_reverse_iterator</span><span
class="special"><</span><span class="identifier">X</span><span
class="special">>::</span><span class="identifier">type</span><span
class="special">(</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">begin</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">))</span></code>.
</p>
</td>
</tr>
</tbody>
</table></div>
-<a name="range.concepts.bidirectional_range.complexity_guarantees"></a><h5>
-<a name="id2693513"></a>
- <a class="link"
href="bidirectional_range.html#range.concepts.bidirectional_range.complexity_guarantees">Complexity
- guarantees</a>
+<a
name="range.concepts.bidirectional_range.complexity_guarantees________________"></a><h5>
+<a name="id4862648"></a>
+ <a class="link"
href="bidirectional_range.html#range.concepts.bidirectional_range.complexity_guarantees________________">Complexity
+ guarantees 复杂度保证</a>
</h5>
<p>
<code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">rbegin</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code> has
the same complexity as <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">end</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code> and
<code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">rend</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code> has the
same complexity as <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">begin</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code> from
- <a class="link" href="forward_range.html" title="Forward
Range">Forward Range</a>.
+ <a class="link" href="forward_range.html" title="Forward Range
前向区间">Forward Range</a>.<br>
+ <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">rbegin</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code>
具有与
+ <a class="link" href="forward_range.html" title="Forward Range
前向区间">Forward Range</a> 的 <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">end</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">)</span></code>
相同的复杂度,而 <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">rend</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">)</span></code>
+ 则具有与 <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">begin</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">)</span></code>
相同的复杂度。
</p>
-<a name="range.concepts.bidirectional_range.invariants"></a><h5>
-<a name="id2693664"></a>
- <a class="link"
href="bidirectional_range.html#range.concepts.bidirectional_range.invariants">Invariants</a>
+<a name="range.concepts.bidirectional_range.invariants__________"></a><h5>
+<a name="id4862930"></a>
+ <a class="link"
href="bidirectional_range.html#range.concepts.bidirectional_range.invariants__________">Invariants
+ 不变式</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
@@ -245,42 +255,47 @@
<tr>
<td>
<p>
- Valid reverse range
+ Valid reverse range<br>
有效反向区间
</p>
</td>
<td>
<p>
For any Bidirectional Range a, <code
class="computeroutput"><span class="special">[</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">rbegin</span><span class="special">(</span><span
class="identifier">a</span><span class="special">),</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">rend</span><span class="special">(</span><span
class="identifier">a</span><span class="special">))</span></code>
is a valid range, that is, <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">rend</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">)</span></code> is reachable from <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">rbegin</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">)</span></code>
- in a finite number of increments.
+ in a finite number of increments.<br>
对于任意双向区间,<code
class="computeroutput"><span class="special">[</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">rbegin</span><span class="special">(</span><span
class="identifier">a</span><span class="special">),</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">rend</span><span class="special">(</span><span
class="identifier">a</span><span class="special">))</span></code>
是一个有效区间,即
+ <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">rend</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code>
+
可以在有限次递增后从
<code class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">rbegin</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">)</span></code> 到达。
</p>
</td>
</tr>
<tr>
<td>
<p>
- Completeness
+ Completeness<br> 完整性
</p>
</td>
<td>
<p>
An algorithm that iterates through the range <code
class="computeroutput"><span class="special">[</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">rbegin</span><span class="special">(</span><span
class="identifier">a</span><span class="special">),</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">rend</span><span class="special">(</span><span
class="identifier">a</span><span class="special">))</span></code>
- will pass through every element of <code
class="computeroutput"><span class="identifier">a</span></code>.
+ will pass through every element of <code
class="computeroutput"><span class="identifier">a</span></code>.<br>
+ 对区间 <code
class="computeroutput"><span class="special">[</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">rbegin</span><span class="special">(</span><span
class="identifier">a</span><span class="special">),</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">rend</span><span class="special">(</span><span
class="identifier">a</span><span class="special">))</span></code>
进行迭代的算法将遍历
+ <code class="computeroutput"><span
class="identifier">a</span></code>
的每一个元素。
</p>
</td>
</tr>
</tbody>
</table></div>
-<a name="range.concepts.bidirectional_range.see_also"></a><h5>
-<a name="id2693925"></a>
- <a class="link"
href="bidirectional_range.html#range.concepts.bidirectional_range.see_also">See
also</a>
+<a name="range.concepts.bidirectional_range.see_also_______"></a><h5>
+<a name="id4863400"></a>
+ <a class="link"
href="bidirectional_range.html#range.concepts.bidirectional_range.see_also_______">See
also
+ 参见</a>
</h5>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions">Implementation
+ <a class="link"
href="../reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions 元函数">Implementation
of metafunctions</a>
</p>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions">Implementation
+ <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions 函数">Implementation
of functions</a>
</p>
</div>
=======================================
--- /trunk/libs/range/doc/html/range/concepts/concept_checking.html Mon May
31 00:54:22 2010
+++ /trunk/libs/range/doc/html/range/concepts/concept_checking.html Tue Jun
22 21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Concept Checking</title>
+<title>Concept Checking 概念检查</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../index.html" title="Chapter 1. Range
2.0">
-<link rel="up" href="../concepts.html" title="Range Concepts">
-<link rel="prev" href="random_access_range.html" title="Random Access
Range">
-<link rel="next" href="../reference.html" title="Reference">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../concepts.html" title="Range Concepts
Range概念">
+<link rel="prev" href="random_access_range.html" title="Random Access
Range 随机访问区间">
+<link rel="next" href="../reference.html" title="Reference
参考手册">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,9 +22,9 @@
<div class="spirit-nav">
<a accesskey="p" href="random_access_range.html"><img
src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../concepts.html"><img
src="../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../index.html"><img
src="../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="../reference.html"><img
src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Concept Checking">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="range.concepts.concept_checking"></a><a class="link"
href="concept_checking.html" title="Concept Checking">Concept Checking</a>
+<a name="range.concepts.concept_checking"></a><a class="link"
href="concept_checking.html" title="Concept Checking
概念检查"> Concept Checking
概念检查</a>
</h3></div></div></div>
<p>
Each of the range concepts has a corresponding concept checking
class in
@@ -34,8 +34,14 @@
is compatible with a range concept. If not, a meaningful compile
time error
is generated. Checks are provided for the range concepts related
to iterator
traversal categories. For example, the following line checks that
the type
- <code class="computeroutput"><span
class="identifier">T</span></code> models the <a class="link"
href="forward_range.html" title="Forward Range">Forward
- Range</a> concept.
+ <code class="computeroutput"><span
class="identifier">T</span></code> models the <a class="link"
href="forward_range.html" title="Forward Range
前向区间">Forward
+ Range</a> concept.<br>
每一个区间概念都有一个对应的概念检查类在
+ <a href="../../../../boost/range/concepts.hpp" target="_top"><code
class="computeroutput"><span class="special"><</span><span
class="identifier">boost</span><span class="special">/</span><span
class="identifier">range</span><span class="special">/</span><span
class="identifier">concepts</span><span class="special">.</span><span
class="identifier">hpp</span><span class="special">></span></code></a>
+ 中。 这些类可以和
<a href="../../../../../../libs/concept_check/index.html"
target="_top">Boost
+ Concept Check library</a>
一起使用,以确保模板参数的类型兼容于某个区间概念。如果不兼容,则产生一个编译期错误。
+
为区间概念所提供的检查是关于迭代器遍历类别的。例如,下面这行代码检查类型
+ <code class="computeroutput"><span
class="identifier">T</span></code> 是否符合 <a
class="link" href="forward_range.html" title="Forward Range
前向区间">Forward
+ Range</a> 的概念。
</p>
<p>
@@ -47,7 +53,7 @@
<p>
An additional concept check is required for the value access
property of
the range based on the range's iterator type. For example to check
for a
- ForwardReadableRange, the following code is required.
+ ForwardReadableRange, the following code is required.<br>
还有一个要进行的概念检查是针对区间所基于的区间迭代器类型的值访问属性。例如检查一个前向可读区间,需要以下代码。
</p>
<p>
@@ -58,32 +64,37 @@
<p>
</p>
<p>
- The following range concept checking classes are provided.
+ The following range concept checking classes are provided.<br>
本库提供了以下区间概念检查类:
</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- Class SinglePassRangeConcept checks for <a class="link"
href="single_pass_range.html" title="Single Pass Range">Single
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Class SinglePassRangeConcept checks for <a class="link"
href="single_pass_range.html" title="Single Pass Range
单遍区间">Single
+ Pass Range</a><br> 类 SinglePassRangeConcept
用于检查 <a class="link"
href="single_pass_range.html" title="Single Pass Range
单遍区间">Single
Pass Range</a>
</li>
-<li class="listitem">
- Class ForwardRangeConcept checks for <a class="link"
href="forward_range.html" title="Forward Range">Forward
+<li>
+ Class ForwardRangeConcept checks for <a class="link"
href="forward_range.html" title="Forward Range
前向区间">Forward
+ Range</a><br> 类 ForwardRangeConcept
用于检查 <a class="link" href="forward_range.html"
title="Forward Range 前向区间">Forward
Range</a>
</li>
-<li class="listitem">
- Class BidirectionalRangeConcept checks for <a class="link"
href="bidirectional_range.html" title="Bidirectional Range">Bidirectional
+<li>
+ Class BidirectionalRangeConcept checks for <a class="link"
href="bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
+ Range</a><br> 类 BidirectionalRangeConcept
用于检查 <a class="link"
href="bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
Range</a>
</li>
-<li class="listitem">
- Class RandomAccessRangeConcept checks for <a class="link"
href="random_access_range.html" title="Random Access Range">Random
- Access Range</a>
+<li>
+ Class RandomAccessRangeConcept checks for <a class="link"
href="random_access_range.html" title="Random Access Range
随机访问区间">Random
+ Access Range</a><br> 类 RandomAccessRangeConcept
用于检查 <a class="link"
href="random_access_range.html" title="Random Access Range
随机访问区间">Random Access Range</a>
</li>
</ul></div>
-<a name="range.concepts.concept_checking.see_also"></a><h5>
-<a name="id2694938"></a>
- <a class="link"
href="concept_checking.html#range.concepts.concept_checking.see_also">See
also</a>
+<a name="range.concepts.concept_checking.see_also_______"></a><h5>
+<a name="id4864834"></a>
+ <a class="link"
href="concept_checking.html#range.concepts.concept_checking.see_also_______">See
also
+ 参见</a>
</h5>
<p>
- <a class="link" href="../style_guide.html" title="Terminology and
style guidelines">Range Terminology and style guidelines</a>
+ <a class="link" href="../style_guide.html" title="Terminology and
style guidelines
术语与风格指导">Range Terminology
and style guidelines
+
区间的术语及风格</a>
</p>
<p>
<a
href="../../../../../../libs/iterator/doc/iterator_concepts.html"
target="_top">Iterator concepts</a>
=======================================
--- /trunk/libs/range/doc/html/range/concepts/forward_range.html Mon May 31
00:54:22 2010
+++ /trunk/libs/range/doc/html/range/concepts/forward_range.html Tue Jun 22
21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Forward Range</title>
+<title>Forward Range 前向区间</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../index.html" title="Chapter 1. Range
2.0">
-<link rel="up" href="../concepts.html" title="Range Concepts">
-<link rel="prev" href="single_pass_range.html" title="Single Pass Range">
-<link rel="next" href="bidirectional_range.html" title="Bidirectional
Range">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../concepts.html" title="Range Concepts
Range概念">
+<link rel="prev" href="single_pass_range.html" title="Single Pass Range
单遍区间">
+<link rel="next" href="bidirectional_range.html" title="Bidirectional
Range 双向区间">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,13 +22,13 @@
<div class="spirit-nav">
<a accesskey="p" href="single_pass_range.html"><img
src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../concepts.html"><img
src="../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../index.html"><img
src="../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="bidirectional_range.html"><img
src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Forward Range">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="range.concepts.forward_range"></a><a class="link"
href="forward_range.html" title="Forward Range">Forward Range</a>
+<a name="range.concepts.forward_range"></a><a class="link"
href="forward_range.html" title="Forward Range
前向区间"> Forward Range
前向区间</a>
</h3></div></div></div>
-<a name="range.concepts.forward_range.notation"></a><h5>
-<a name="id2692268"></a>
- <a class="link"
href="forward_range.html#range.concepts.forward_range.notation">Notation</a>
+<a name="range.concepts.forward_range.notation_______"></a><h5>
+<a name="id4861070"></a>
+ <a class="link"
href="forward_range.html#range.concepts.forward_range.notation_______">Notation
符号</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
@@ -45,8 +45,9 @@
</td>
<td>
<p>
- A type that is a model of <a class="link"
href="forward_range.html" title="Forward Range">Forward
- Range</a>.
+ A type that is a model of <a class="link"
href="forward_range.html" title="Forward Range
前向区间">Forward
+ Range</a>.<br>
一个类型,<a class="link"
href="forward_range.html" title="Forward Range
前向区间">Forward
+ Range</a> 的 model.
</p>
</td>
</tr>
@@ -58,31 +59,35 @@
</td>
<td>
<p>
- Object of type X.
+ Object of type X.<br> 类型 X
的对象
</p>
</td>
</tr>
</tbody>
</table></div>
-<a name="range.concepts.forward_range.description"></a><h5>
-<a name="id2692364"></a>
- <a class="link"
href="forward_range.html#range.concepts.forward_range.description">Description</a>
+<a name="range.concepts.forward_range.description_______"></a><h5>
+<a name="id4861182"></a>
+ <a class="link"
href="forward_range.html#range.concepts.forward_range.description_______">Description
+ 说明</a>
</h5>
<p>
A range <code class="computeroutput"><span
class="identifier">X</span></code> where <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">range_iterator</span><span
class="special"><</span><span class="identifier">X</span><span
class="special">>::</span><span class="identifier">type</span></code> is
a model of <a
href="../../../../../../libs/iterator/doc/new-iter-concepts.html#forward-traversal-iterators-lib-forward-traversal-iterators"
target="_top">Forward
- Traversal Iterator</a>.
+ Traversal Iterator</a>.<br> 区间 <code
class="computeroutput"><span class="identifier">X</span></code>
+ 的 <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">range_iterator</span><span
class="special"><</span><span class="identifier">X</span><span
class="special">>::</span><span class="identifier">type</span></code>
为 <a
href="../../../../../../libs/iterator/doc/new-iter-concepts.html#forward-traversal-iterators-lib-forward-traversal-iterators"
target="_top">Forward
+ Traversal Iterator</a> 的 model.
</p>
-<a name="range.concepts.forward_range.refinement_of"></a><h5>
-<a name="id2692436"></a>
- <a class="link"
href="forward_range.html#range.concepts.forward_range.refinement_of">Refinement
of</a>
+<a name="range.concepts.forward_range.refinement_of__________"></a><h5>
+<a name="id4861308"></a>
+ <a class="link"
href="forward_range.html#range.concepts.forward_range.refinement_of__________">Refinement
+ of 强化自</a>
</h5>
<p>
- <a class="link" href="single_pass_range.html" title="Single Pass
Range">Single Pass Range</a>
+ <a class="link" href="single_pass_range.html" title="Single Pass
Range 单遍区间">Single Pass Range</a>
</p>
-<a name="range.concepts.forward_range.associated_types"></a><h5>
-<a name="id2692465"></a>
- <a class="link"
href="forward_range.html#range.concepts.forward_range.associated_types">Associated
- types</a>
+<a
name="range.concepts.forward_range.associated_types_____________"></a><h5>
+<a name="id4861338"></a>
+ <a class="link"
href="forward_range.html#range.concepts.forward_range.associated_types_____________">Associated
+ types 关联类型</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
@@ -95,7 +100,7 @@
<tr>
<td>
<p>
- Distance type
+ Distance type<br> 距离类型
</p>
</td>
<td>
@@ -107,14 +112,14 @@
<p>
A signed integral type used to represent the distance
between two
of the Range's iterators. This type must be the same as
the iterator's
- distance type.
+ distance type.<br>
一个有符号整数类型,用于表示两个区间迭代器间的距离。该类型必须与迭代器的距离类型相同。
</p>
</td>
</tr>
<tr>
<td>
<p>
- Size type
+ Size type<br> 大小类型
</p>
</td>
<td>
@@ -125,22 +130,22 @@
<td>
<p>
An unsigned integral type that can represent any
nonnegative value
- of the Range's distance type.
+ of the Range's distance type.<br>
一个无符号整数类型,可以表示区间距离类型的任意非负值。
</p>
</td>
</tr>
</tbody>
</table></div>
-<a name="range.concepts.forward_range.see_also"></a><h5>
-<a name="id2692622"></a>
- <a class="link"
href="forward_range.html#range.concepts.forward_range.see_also">See also</a>
+<a name="range.concepts.forward_range.see_also_______"></a><h5>
+<a name="id4861518"></a>
+ <a class="link"
href="forward_range.html#range.concepts.forward_range.see_also_______">See
also 参见</a>
</h5>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions">Implementation
+ <a class="link"
href="../reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions 元函数">Implementation
of metafunctions</a>
</p>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions">Implementation
+ <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions 函数">Implementation
of functions</a>
</p>
</div>
=======================================
--- /trunk/libs/range/doc/html/range/concepts/overview.html Mon May 31
00:54:22 2010
+++ /trunk/libs/range/doc/html/range/concepts/overview.html Tue Jun 22
21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Overview</title>
+<title>Overview 简介</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../index.html" title="Chapter 1. Range
2.0">
-<link rel="up" href="../concepts.html" title="Range Concepts">
-<link rel="prev" href="../concepts.html" title="Range Concepts">
-<link rel="next" href="single_pass_range.html" title="Single Pass Range">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../concepts.html" title="Range Concepts
Range概念">
+<link rel="prev" href="../concepts.html" title="Range Concepts
Range概念">
+<link rel="next" href="single_pass_range.html" title="Single Pass Range
单遍区间">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,45 +22,53 @@
<div class="spirit-nav">
<a accesskey="p" href="../concepts.html"><img
src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../concepts.html"><img
src="../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../index.html"><img
src="../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="single_pass_range.html"><img
src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Overview">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="range.concepts.overview"></a><a class="link" href="overview.html"
title="Overview">Overview</a>
+<a name="range.concepts.overview"></a><a class="link" href="overview.html"
title="Overview 简介"> Overview 简介</a>
</h3></div></div></div>
<p>
A Range is a <span class="bold"><strong><span
class="emphasis"><em>concept</em></span></strong></span>
similar to the STL <a
href="http://www.sgi.com/Technology/STL/Container.html"
target="_top">Container</a>
concept. A Range provides iterators for accessing a half-open
range <code class="computeroutput"><span class="special">[</span><span
class="identifier">first</span><span class="special">,</span><span
class="identifier">one_past_last</span><span
class="special">)</span></code> of elements and provides information about
the number of elements in the Range. However, a Range has fewer
requirements
- than a Container.
+ than a Container.<br>
区间的/概念/类似于STL中的
<a href="http://www.sgi.com/Technology/STL/Container.html"
target="_top">容器</a>
+ 概念。
一个区间提供了访问一个半开放区间
<code class="computeroutput"><span class="special">[</span><span
class="identifier">first</span><span class="special">,</span><span
class="identifier">one_past_last</span><span
class="special">)</span></code>
的迭代器,还提供了关于区间中的元素数量的信息。
+
但是,区间比容器少了一点点要求。
</p>
<p>
The motivation for the Range concept is that there are many useful
Container-like
types that do not meet the full requirements of Container, and
many algorithms
that can be written with this reduced set of requirements. In
particular,
- a Range does not necessarily
+ a Range does not necessarily<br>
区间概念的动机是,有许多有用的、类似于容器的类型不能完全满足容器的所有要求,而很多算法可以依据这个有所简化的要求来编写。
+
具体的说,区间不要求:
</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- own the elements that can be accessed through it,
+<div class="itemizedlist"><ul type="disc">
+<li>
+ own the elements that can be accessed through it,<br>
拥有通过它来访问的元素,
</li>
-<li class="listitem">
- have copy semantics,
+<li>
+ have copy semantics,<br>
具有复制语义,
</li>
</ul></div>
<p>
Because of the second requirement, a Range object must be passed
by (const
- or non-const) reference in generic code.
+ or non-const) reference in generic code.<br>
由于第二个要求,区间对象必须以(常量或非常量)引用的方式传入泛型代码。
</p>
<p>
The operations that can be performed on a Range is dependent on
the <a
href="../../../../iterator/doc/new-iter-concepts.html#iterator-traversal-concepts-lib-iterator-traversal"
target="_top">traversal
category</a> of the underlying iterator type. Therefore the range
concepts
are named to reflect which traversal category its iterators
support. See
also terminology and style guidelines. for more information about
naming
- of ranges.
+ of ranges.<br>
一个区间上可以执行的操作取决于其底层迭代器类型的
+ <a
href="../../../../iterator/doc/new-iter-concepts.html#iterator-traversal-concepts-lib-iterator-traversal"
target="_top">遍历类别</a>。
+
因此区间概念的命名正是反映了其迭代器所支持的遍历类别。有关区间命名的更多信息请见
+ 术语及风格 一节。
</p>
<p>
The concepts described below specifies associated types as <a
href="../../../../libs/mpl/doc/refmanual/metafunction.html"
target="_top">metafunctions</a>
- and all functions as free-standing functions to allow for a layer
of indirection.
+ and all functions as free-standing functions to allow for a layer
of indirection.<br>
+ 下述概念以 <a
href="../../../../libs/mpl/doc/refmanual/metafunction.html"
target="_top">元函数</a>
+
的方式给出关联类型,而且所有函数都是独立函数,以用于间接层。
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
width="100%"><tr>
=======================================
--- /trunk/libs/range/doc/html/range/concepts/random_access_range.html Mon
May 31 00:54:22 2010
+++ /trunk/libs/range/doc/html/range/concepts/random_access_range.html Tue
Jun 22 21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Random Access Range</title>
+<title>Random Access Range
随机访问区间</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../index.html" title="Chapter 1. Range
2.0">
-<link rel="up" href="../concepts.html" title="Range Concepts">
-<link rel="prev" href="bidirectional_range.html" title="Bidirectional
Range">
-<link rel="next" href="concept_checking.html" title="Concept Checking">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../concepts.html" title="Range Concepts
Range概念">
+<link rel="prev" href="bidirectional_range.html" title="Bidirectional
Range 双向区间">
+<link rel="next" href="concept_checking.html" title="Concept Checking
概念检查">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,30 +22,34 @@
<div class="spirit-nav">
<a accesskey="p" href="bidirectional_range.html"><img
src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../concepts.html"><img
src="../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../index.html"><img
src="../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="concept_checking.html"><img
src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Random Access Range">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="range.concepts.random_access_range"></a><a class="link"
href="random_access_range.html" title="Random Access Range">Random Access
Range</a>
+<a name="range.concepts.random_access_range"></a><a class="link"
href="random_access_range.html" title="Random Access Range
随机访问区间"> Random Access Range
+ 随机访问区间</a>
</h3></div></div></div>
-<a name="range.concepts.random_access_range.description"></a><h5>
-<a name="id2693982"></a>
- <a class="link"
href="random_access_range.html#range.concepts.random_access_range.description">Description</a>
+<a name="range.concepts.random_access_range.description_______"></a><h5>
+<a name="id4863458"></a>
+ <a class="link"
href="random_access_range.html#range.concepts.random_access_range.description_______">Description
+ 说明</a>
</h5>
<p>
A range <code class="computeroutput"><span
class="identifier">X</span></code> where <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">range_iterator</span><span
class="special"><</span><span class="identifier">X</span><span
class="special">>::</span><span class="identifier">type</span></code> is
a model of <a
href="../../../../../../libs/iterator/doc/new-iter-concepts.html#random-access-traversal-iterators-lib-random-access-traversal-iterators"
target="_top">Random
- Access Traversal Iterator</a>.
+ Access Traversal Iterator</a>.<br> 区间 <code
class="computeroutput"><span class="identifier">X</span></code>
+ 的 <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">range_iterator</span><span
class="special"><</span><span class="identifier">X</span><span
class="special">>::</span><span class="identifier">type</span></code>
为 <a
href="../../../../../../libs/iterator/doc/new-iter-concepts.html#random-access-traversal-iterators-lib-random-access-traversal-iterators"
target="_top">Random
+ Access Traversal Iterator</a> 的 model.
</p>
-<a name="range.concepts.random_access_range.refinement_of"></a><h5>
-<a name="id2694053"></a>
- <a class="link"
href="random_access_range.html#range.concepts.random_access_range.refinement_of">Refinement
- of</a>
+<a
name="range.concepts.random_access_range.refinement_of__________"></a><h5>
+<a name="id4863586"></a>
+ <a class="link"
href="random_access_range.html#range.concepts.random_access_range.refinement_of__________">Refinement
+ of 强化自</a>
</h5>
<p>
- <a class="link" href="bidirectional_range.html"
title="Bidirectional Range">Bidirectional Range</a>
+ <a class="link" href="bidirectional_range.html"
title="Bidirectional Range 双向区间">Bidirectional
Range</a>
</p>
-<a name="range.concepts.random_access_range.valid_expressions"></a><h5>
-<a name="id2694081"></a>
- <a class="link"
href="random_access_range.html#range.concepts.random_access_range.valid_expressions">Valid
- expressions</a>
+<a
name="range.concepts.random_access_range.valid_expressions________________"></a><h5>
+<a name="id4863617"></a>
+ <a class="link"
href="random_access_range.html#range.concepts.random_access_range.valid_expressions________________">Valid
+ expressions 有效表达式</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
@@ -56,24 +60,24 @@
<thead><tr>
<th>
<p>
- Name
+ Name 名字
</p>
</th>
<th>
<p>
- Expression
+ Expression 表达式
</p>
</th>
<th>
<p>
- Return type
+ Return type 返回类型
</p>
</th>
</tr></thead>
<tbody><tr>
<td>
<p>
- Size of range
+ Size of range<br> 区间大小
</p>
</td>
<td>
@@ -88,10 +92,10 @@
</td>
</tr></tbody>
</table></div>
-<a name="range.concepts.random_access_range.expression_semantics"></a><h5>
-<a name="id2694229"></a>
- <a class="link"
href="random_access_range.html#range.concepts.random_access_range.expression_semantics">Expression
- semantics</a>
+<a
name="range.concepts.random_access_range.expression_semantics________________"></a><h5>
+<a name="id4863773"></a>
+ <a class="link"
href="random_access_range.html#range.concepts.random_access_range.expression_semantics________________">Expression
+ semantics 表达式语义</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
@@ -102,17 +106,17 @@
<thead><tr>
<th>
<p>
- Expression
+ Expression 表达式
</p>
</th>
<th>
<p>
- Semantics
+ Semantics 语义
</p>
</th>
<th>
<p>
- Postcondition
+ Postcondition 后验条件
</p>
</th>
</tr></thead>
@@ -127,7 +131,9 @@
Returns the size of the Range, that is, its number of
elements.
Note <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">size</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span>
<span class="special">==</span> <span
class="number">0u</span></code>
- is equivalent to <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">empty</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code>.
+ is equivalent to <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">empty</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code>.<br>
返回区间的大小,即元素的数量。注意,<code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">size</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">)</span>
+ <span class="special">==</span> <span
class="number">0u</span></code>
+ 等价于 <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">empty</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">)</span></code>.
</p>
</td>
<td>
@@ -138,17 +144,19 @@
</td>
</tr></tbody>
</table></div>
-<a name="range.concepts.random_access_range.complexity_guarantees"></a><h5>
-<a name="id2694455"></a>
- <a class="link"
href="random_access_range.html#range.concepts.random_access_range.complexity_guarantees">Complexity
- guarantees</a>
+<a
name="range.concepts.random_access_range.complexity_guarantees________________"></a><h5>
+<a name="id4864079"></a>
+ <a class="link"
href="random_access_range.html#range.concepts.random_access_range.complexity_guarantees________________">Complexity
+ guarantees 复杂度保证</a>
</h5>
<p>
- <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">size</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code> completes
in amortized constant time.
+ <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">size</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code> completes
in amortized constant time.<br>
+ <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">size</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code>
在常量时间内完成。
</p>
-<a name="range.concepts.random_access_range.invariants"></a><h5>
-<a name="id2694508"></a>
- <a class="link"
href="random_access_range.html#range.concepts.random_access_range.invariants">Invariants</a>
+<a name="range.concepts.random_access_range.invariants__________"></a><h5>
+<a name="id4864167"></a>
+ <a class="link"
href="random_access_range.html#range.concepts.random_access_range.invariants__________">Invariants
+ 不变式</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
@@ -159,13 +167,13 @@
<tbody><tr>
<td>
<p>
- Range size
+ Range size<br> 区间大小
</p>
</td>
<td>
<p>
<code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">size</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code>
- is equal to the <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">end</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code> - <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">begin</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">)</span></code>.
+ is equal to the <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">end</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code> - <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">begin</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">)</span></code>.<br> <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">size</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code>
等于 <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">end</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code> - <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">begin</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">)</span></code>.
</p>
</td>
</tr></tbody>
=======================================
--- /trunk/libs/range/doc/html/range/concepts/single_pass_range.html Mon
May 31 00:54:22 2010
+++ /trunk/libs/range/doc/html/range/concepts/single_pass_range.html Tue
Jun 22 21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Single Pass Range</title>
+<title>Single Pass Range 单遍区间</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../index.html" title="Chapter 1. Range
2.0">
-<link rel="up" href="../concepts.html" title="Range Concepts">
-<link rel="prev" href="overview.html" title="Overview">
-<link rel="next" href="forward_range.html" title="Forward Range">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../concepts.html" title="Range Concepts
Range概念">
+<link rel="prev" href="overview.html" title="Overview 简介">
+<link rel="next" href="forward_range.html" title="Forward Range
前向区间">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,13 +22,15 @@
<div class="spirit-nav">
<a accesskey="p" href="overview.html"><img
src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../concepts.html"><img
src="../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../index.html"><img
src="../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="forward_range.html"><img
src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Single Pass Range">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="range.concepts.single_pass_range"></a><a class="link"
href="single_pass_range.html" title="Single Pass Range">Single Pass
Range</a>
+<a name="range.concepts.single_pass_range"></a><a class="link"
href="single_pass_range.html" title="Single Pass Range
单遍区间"> Single Pass Range
+ 单遍区间</a>
</h3></div></div></div>
-<a name="range.concepts.single_pass_range.notation"></a><h5>
-<a name="id2690886"></a>
- <a class="link"
href="single_pass_range.html#range.concepts.single_pass_range.notation">Notation</a>
+<a name="range.concepts.single_pass_range.notation_______"></a><h5>
+<a name="id4807617"></a>
+ <a class="link"
href="single_pass_range.html#range.concepts.single_pass_range.notation_______">Notation
+ 符号</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
@@ -45,8 +47,9 @@
</td>
<td>
<p>
- A type that is a model of <a class="link"
href="single_pass_range.html" title="Single Pass Range">Single
- Pass Range</a>.
+ A type that is a model of <a class="link"
href="single_pass_range.html" title="Single Pass Range
单遍区间">Single
+ Pass Range</a>.<br> 符合 <a class="link"
href="single_pass_range.html" title="Single Pass Range
单遍区间">Single
+ Pass Range</a>
的一个类型。
</p>
</td>
</tr>
@@ -58,24 +61,27 @@
</td>
<td>
<p>
- Object of type X.
+ Object of type X.<br> 类型 X
的对象。
</p>
</td>
</tr>
</tbody>
</table></div>
-<a name="range.concepts.single_pass_range.description"></a><h5>
-<a name="id2690988"></a>
- <a class="link"
href="single_pass_range.html#range.concepts.single_pass_range.description">Description</a>
+<a name="range.concepts.single_pass_range.description_______"></a><h5>
+<a name="id4807734"></a>
+ <a class="link"
href="single_pass_range.html#range.concepts.single_pass_range.description_______">Description
+ 说明</a>
</h5>
<p>
A range <code class="computeroutput"><span
class="identifier">X</span></code> where <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">range_iterator</span><span
class="special"><</span><span class="identifier">X</span><span
class="special">>::</span><span class="identifier">type</span></code> is
a model of <a
href="../../../../../../libs/iterator/doc/new-iter-concepts.html#singls-pass-iterators-lib-single-pass-iterators"
target="_top">Single
- Pass Iterator</a>.
+ Pass Iterator</a>.<br> 一个区间 <code
class="computeroutput"><span
class="identifier">X</span></code>,其
+ <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">range_iterator</span><span
class="special"><</span><span class="identifier">X</span><span
class="special">>::</span><span class="identifier">type</span></code>
为 <a
href="../../../../../../libs/iterator/doc/new-iter-concepts.html#singls-pass-iterators-lib-single-pass-iterators"
target="_top">Single
+ Pass Iterator</a> 的 model。
</p>
-<a name="range.concepts.single_pass_range.associated_types"></a><h5>
-<a name="id2691060"></a>
- <a class="link"
href="single_pass_range.html#range.concepts.single_pass_range.associated_types">Associated
- types</a>
+<a
name="range.concepts.single_pass_range.associated_types_____________"></a><h5>
+<a name="id4807871"></a>
+ <a class="link"
href="single_pass_range.html#range.concepts.single_pass_range.associated_types_____________">Associated
+ types 关联类型</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
@@ -88,7 +94,7 @@
<tr>
<td>
<p>
- Iterator type
+ Iterator type <br>
迭代器类型
</p>
</td>
<td>
@@ -101,14 +107,16 @@
The type of iterator used to iterate through a Range's
elements.
The iterator's value type is expected to be the Range's
value type.
A conversion from the iterator type to the <code
class="computeroutput"><span class="keyword">const</span></code>
- iterator type must exist.
+ iterator type must exist.<br>
用于迭代区间中的元素的迭代器的类型。迭代器的
+ value type 应为区间的
value type. 从该迭代器类型到
+ <code class="computeroutput"><span
class="keyword">const</span></code>
迭代器类型的转换必须存在。
</p>
</td>
</tr>
<tr>
<td>
<p>
- Const iterator type
+ Const iterator type<br>
常量迭代器类型
</p>
</td>
<td>
@@ -119,19 +127,19 @@
<td>
<p>
A type of iterator that may be used to examine, but not
to modify,
- a Range's elements.
+ a Range's elements.<br>
一个迭代器类型,该迭代器可用于检测但不可修改区间中的元素。
</p>
</td>
</tr>
</tbody>
</table></div>
-<a name="range.concepts.single_pass_range.valid_expressions"></a><h5>
-<a name="id2691234"></a>
- <a class="link"
href="single_pass_range.html#range.concepts.single_pass_range.valid_expressions">Valid
- expressions</a>
+<a
name="range.concepts.single_pass_range.valid_expressions________________"></a><h5>
+<a name="id4808089"></a>
+ <a class="link"
href="single_pass_range.html#range.concepts.single_pass_range.valid_expressions________________">Valid
+ expressions 有效表达式</a>
</h5>
<p>
- The following expressions must be valid.
+ The following expressions must be valid.<br>
以下表达式必须有效。
</p>
<div class="informaltable"><table class="table">
<colgroup>
@@ -142,17 +150,17 @@
<thead><tr>
<th>
<p>
- Name
+ Name 名字
</p>
</th>
<th>
<p>
- Expression
+ Expression 表达式
</p>
</th>
<th>
<p>
- Return type
+ Return type 返回类型
</p>
</th>
</tr></thead>
@@ -160,7 +168,7 @@
<tr>
<td>
<p>
- Beginning of range
+ Beginning of range<br>
区间的始端
</p>
</td>
<td>
@@ -179,7 +187,7 @@
<tr>
<td>
<p>
- End of range
+ End of range <br>
区间的末端
</p>
</td>
<td>
@@ -197,10 +205,10 @@
</tr>
</tbody>
</table></div>
-<a name="range.concepts.single_pass_range.expression_semantics"></a><h5>
-<a name="id2691568"></a>
- <a class="link"
href="single_pass_range.html#range.concepts.single_pass_range.expression_semantics">Expression
- semantics</a>
+<a
name="range.concepts.single_pass_range.expression_semantics________________"></a><h5>
+<a name="id4859957"></a>
+ <a class="link"
href="single_pass_range.html#range.concepts.single_pass_range.expression_semantics________________">Expression
+ semantics 表达式语义</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
@@ -211,17 +219,17 @@
<thead><tr>
<th>
<p>
- Expression
+ Expression 表达式
</p>
</th>
<th>
<p>
- Semantics
+ Semantics 语义
</p>
</th>
<th>
<p>
- Postcondition
+ Postcondition 后验条件
</p>
</th>
</tr></thead>
@@ -235,13 +243,15 @@
<td>
<p>
Returns an iterator pointing to the first element in the
Range.
+ <br>
返回一个迭代器,指向区间中的第一个元素
</p>
</td>
<td>
<p>
<code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">begin</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code>
is either dereferenceable or past-the-end. It is
past-the-end if
- and only if <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">distance</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span> <span
class="special">==</span> <span class="number">0</span></code>.
+ and only if <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">distance</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span> <span
class="special">==</span> <span class="number">0</span></code>.<br> <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">begin</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">)</span></code>
是可提领的或是 past-the-end.
+ 它是 past-the-end
当且仅当 <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">size</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span> <span
class="special">==</span> <span class="number">0</span></code>.
</p>
</td>
</tr>
@@ -254,30 +264,32 @@
<td>
<p>
Returns an iterator pointing one past the last element
in the Range.
+ <br>
返回一个迭代器,指向区间中的最后一个元素之后。
</p>
</td>
<td>
<p>
<code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">end</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code>
- is past-the-end.
+ is past-the-end.<br> <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">end</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code> 为
past-the-end.
</p>
</td>
</tr>
</tbody>
</table></div>
-<a name="range.concepts.single_pass_range.complexity_guarantees"></a><h5>
-<a name="id2691839"></a>
- <a class="link"
href="single_pass_range.html#range.concepts.single_pass_range.complexity_guarantees">Complexity
- guarantees</a>
+<a
name="range.concepts.single_pass_range.complexity_guarantees________________"></a><h5>
+<a name="id4860352"></a>
+ <a class="link"
href="single_pass_range.html#range.concepts.single_pass_range.complexity_guarantees________________">Complexity
+ guarantees 复杂度保证</a>
</h5>
<p>
<code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">end</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code> is at most
amortized linear time, <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">begin</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code> is
amortized
constant time. For most practical purposes, one can expect both to
be amortized
- constant time.
+ constant time.<br> <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">end</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code>
至多为分期线性时间,<code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">begin</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">)</span></code>
为分期常量时间。大多数情况下,你可以期望两个函数均为分期常量时间。
</p>
-<a name="range.concepts.single_pass_range.invariants"></a><h5>
-<a name="id2691922"></a>
- <a class="link"
href="single_pass_range.html#range.concepts.single_pass_range.invariants">Invariants</a>
+<a name="range.concepts.single_pass_range.invariants__________"></a><h5>
+<a name="id4860504"></a>
+ <a class="link"
href="single_pass_range.html#range.concepts.single_pass_range.invariants__________">Invariants
+ 不变式</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
@@ -289,45 +301,53 @@
<tr>
<td>
<p>
- Valid range
+ Valid range <br> 有效区间
</p>
</td>
<td>
<p>
For any Range <code class="computeroutput"><span
class="identifier">a</span></code>,
<code class="computeroutput"><span
class="special">[</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">begin</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">),</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">end</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">))</span></code> is a valid range, that is, <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">end</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">)</span></code>
- is reachable from <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">begin</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code> in a
finite number of increments.
+ is reachable from <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">begin</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code> in a
finite number of increments.<br>
+ 对于任意区间 <code
class="computeroutput"><span class="identifier">a</span></code>,
+ <code class="computeroutput"><span
class="special">[</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">begin</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">),</span><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">end</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">))</span></code>
是一个有效区间,即
+ <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">end</span><span class="special">(</span><span
class="identifier">a</span><span class="special">)</span></code>
+ 可以从 <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">begin</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">)</span></code>
在经过有限次递增后到达。
</p>
</td>
</tr>
<tr>
<td>
<p>
- Completeness
+ Completeness<br> 完整性
</p>
</td>
<td>
<p>
An algorithm that iterates through the range <code
class="computeroutput"><span class="special">[</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">begin</span><span class="special">(</span><span
class="identifier">a</span><span class="special">),</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">end</span><span class="special">(</span><span
class="identifier">a</span><span class="special">))</span></code>
- will pass through every element of <code
class="computeroutput"><span class="identifier">a</span></code>.
+ will pass through every element of <code
class="computeroutput"><span class="identifier">a</span></code>.<br>
+ 一个对区间 <code
class="computeroutput"><span class="special">[</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">begin</span><span class="special">(</span><span
class="identifier">a</span><span class="special">),</span><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">end</span><span class="special">(</span><span
class="identifier">a</span><span class="special">))</span></code>
+
进行迭代的算法将遍历
<code class="computeroutput"><span class="identifier">a</span></code>
+ 的每一个元素。
</p>
</td>
</tr>
</tbody>
</table></div>
-<a name="range.concepts.single_pass_range.see_also"></a><h5>
-<a name="id2692193"></a>
- <a class="link"
href="single_pass_range.html#range.concepts.single_pass_range.see_also">See
also</a>
+<a name="range.concepts.single_pass_range.see_also_______"></a><h5>
+<a name="id4860994"></a>
+ <a class="link"
href="single_pass_range.html#range.concepts.single_pass_range.see_also_______">See
also
+ 参见</a>
</h5>
<p>
- <a class="link" href="../reference/extending.html"
title="Extending the library">Extending the library for UDTs</a>
+ <a class="link" href="../reference/extending.html"
title="Extending the library 扩展本库">Extending
the library for UDTs</a>
</p>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions">Implementation
+ <a class="link"
href="../reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions 元函数">Implementation
of metafunctions</a>
</p>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions">Implementation
+ <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions 函数">Implementation
of functions</a>
</p>
<p>
=======================================
--- /trunk/libs/range/doc/html/range/concepts.html Mon May 31 00:54:22 2010
+++ /trunk/libs/range/doc/html/range/concepts.html Tue Jun 22 21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Range Concepts</title>
+<title>Range Concepts Range概念</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../index.html" title="Chapter 1. Range
2.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../index.html" title="Chapter 1. Range
2.0">
<link rel="up" href="../index.html" title="Chapter 1. Range 2.0">
-<link rel="prev" href="introduction.html" title="Introduction">
-<link rel="next" href="concepts/overview.html" title="Overview">
+<link rel="prev" href="introduction.html" title="Introduction
简介">
+<link rel="next" href="concepts/overview.html" title="Overview
简介">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,17 +22,20 @@
<div class="spirit-nav">
<a accesskey="p" href="introduction.html"><img
src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../index.html"><img
src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h"
href="../index.html"><img src="../../../../../doc/html/images/home.png"
alt="Home"></a><a accesskey="n" href="concepts/overview.html"><img
src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Range Concepts">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="range.concepts"></a><a class="link" href="concepts.html"
title="Range Concepts"> Range Concepts</a>
+<a name="range.concepts"></a><a class="link" href="concepts.html"
title="Range Concepts Range概念"> Range Concepts
Range概念</a>
</h2></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a
href="concepts/overview.html">Overview</a></span></dt>
-<dt><span class="section"><a href="concepts/single_pass_range.html">Single
Pass Range</a></span></dt>
-<dt><span class="section"><a href="concepts/forward_range.html">Forward
Range</a></span></dt>
-<dt><span class="section"><a
href="concepts/bidirectional_range.html">Bidirectional Range</a></span></dt>
-<dt><span class="section"><a
href="concepts/random_access_range.html">Random Access Range</a></span></dt>
-<dt><span class="section"><a href="concepts/concept_checking.html">Concept
Checking</a></span></dt>
+<dt><span class="section"><a href="concepts/overview.html"> Overview
简介</a></span></dt>
+<dt><span class="section"><a href="concepts/single_pass_range.html">
Single Pass Range
+ 单遍区间</a></span></dt>
+<dt><span class="section"><a href="concepts/forward_range.html"> Forward
Range 前向区间</a></span></dt>
+<dt><span class="section"><a href="concepts/bidirectional_range.html">
Bidirectional Range
+ 双向区间</a></span></dt>
+<dt><span class="section"><a href="concepts/random_access_range.html">
Random Access Range
+ 随机访问区间</a></span></dt>
+<dt><span class="section"><a href="concepts/concept_checking.html">
Concept Checking 概念检查</a></span></dt>
</dl></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
width="100%"><tr>
=======================================
--- /trunk/libs/range/doc/html/range/examples.html Mon May 31 00:54:22 2010
+++ /trunk/libs/range/doc/html/range/examples.html Tue Jun 22 21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Examples</title>
+<title>Examples 示例</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../index.html" title="Chapter 1. Range
2.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../index.html" title="Chapter 1. Range
2.0">
<link rel="up" href="../index.html" title="Chapter 1. Range 2.0">
-<link rel="prev" href="library_headers/algorithm_extensions.html"
title="Algorithm Extensions">
-<link rel="next" href="mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke
Sogame)">
+<link rel="prev" href="library_headers/algorithm_extensions.html"
title="Algorithm Extensions 算法扩展">
+<link rel="next" href="mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke
Sogame 由 Shunsuke Sogame 贡献)">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,28 +22,30 @@
<div class="spirit-nav">
<a accesskey="p" href="library_headers/algorithm_extensions.html"><img
src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../index.html"><img
src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h"
href="../index.html"><img src="../../../../../doc/html/images/home.png"
alt="Home"></a><a accesskey="n" href="mfc_atl.html"><img
src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Examples">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="range.examples"></a><a class="link" href="examples.html"
title="Examples">Examples</a>
+<a name="range.examples"></a><a class="link" href="examples.html"
title="Examples 示例"> Examples 示例</a>
</h2></div></div></div>
<p>
- Some examples are given in the accompanying test files:
+ Some examples are given in the accompanying test files:<br>
在随附的测试文件中给出了一些例子:
</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
<a href="http://www.boost.org/libs/range/test/string.cpp"
target="_top">string.cpp</a>
- shows how to implement a container version of <code
class="computeroutput"><span class="identifier">std</span><span
class="special">::</span><span class="identifier">find</span><span
class="special">()</span></code> that works with <code
class="computeroutput"><span class="keyword">char</span><span
class="special">[]</span></code>,<code class="computeroutput"><span
class="keyword">wchar_t</span><span class="special">[]</span></code>,<code
class="computeroutput"><span class="keyword">char</span><span
class="special">*</span></code>,<code class="computeroutput"><span
class="keyword">wchar_t</span><span class="special">*</span></code>.
+ shows how to implement a container version of <code
class="computeroutput"><span class="identifier">std</span><span
class="special">::</span><span class="identifier">find</span><span
class="special">()</span></code> that works with <code
class="computeroutput"><span class="keyword">char</span><span
class="special">[]</span></code>,<code class="computeroutput"><span
class="keyword">wchar_t</span><span class="special">[]</span></code>,<code
class="computeroutput"><span class="keyword">char</span><span
class="special">*</span></code>,<code class="computeroutput"><span
class="keyword">wchar_t</span><span class="special">*</span></code>.<br><a
href="http://www.boost.org/libs/range/test/string.cpp"
target="_top">string.cpp</a>
+
示范如何实例一个容器版本的
<code class="computeroutput"><span class="identifier">std</span><span
class="special">::</span><span class="identifier">find</span><span
class="special">()</span></code>,可用于 <code
class="computeroutput"><span class="keyword">char</span><span
class="special">[]</span></code>,<code class="computeroutput"><span
class="keyword">wchar_t</span><span class="special">[]</span></code>,<code
class="computeroutput"><span class="keyword">char</span><span
class="special">*</span></code>,<code class="computeroutput"><span
class="keyword">wchar_t</span><span class="special">*</span></code>.
</li>
-<li class="listitem">
+<li>
<a href="http://www.boost.org/libs/range/test/algorithm_example.cpp"
target="_top">algorithm_example.cpp</a>
- shows the replace example from the introduction.
+ shows the replace example from the introduction.<br><a
href="http://www.boost.org/libs/range/test/algorithm_example.cpp"
target="_top">algorithm_example.cpp</a>
+ 示范"简介"一节中的
replace 例子。
</li>
-<li class="listitem"><a
href="http://www.boost.org/libs/range/test/iterator_range.cpp"
target="_top">iterator_range.cpp</a></li>
-<li class="listitem"><a
href="http://www.boost.org/libs/range/test/sub_range.cpp"
target="_top">sub_range.cpp</a></li>
-<li class="listitem"><a
href="http://www.boost.org/libs/range/test/iterator_pair.cpp"
target="_top">iterator_pair.cpp</a></li>
-<li class="listitem"><a
href="http://www.boost.org/libs/range/test/reversible_range.cpp"
target="_top">reversible_range.cpp</a></li>
-<li class="listitem"><a
href="http://www.boost.org/libs/range/test/std_container.cpp"
target="_top">std_container.cpp</a></li>
-<li class="listitem"><a
href="http://www.boost.org/libs/range/test/array.cpp"
target="_top">array.cpp</a></li>
+<li><a href="http://www.boost.org/libs/range/test/iterator_range.cpp"
target="_top">iterator_range.cpp</a></li>
+<li><a href="http://www.boost.org/libs/range/test/sub_range.cpp"
target="_top">sub_range.cpp</a></li>
+<li><a href="http://www.boost.org/libs/range/test/iterator_pair.cpp"
target="_top">iterator_pair.cpp</a></li>
+<li><a href="http://www.boost.org/libs/range/test/reversible_range.cpp"
target="_top">reversible_range.cpp</a></li>
+<li><a href="http://www.boost.org/libs/range/test/std_container.cpp"
target="_top">std_container.cpp</a></li>
+<li><a href="http://www.boost.org/libs/range/test/array.cpp"
target="_top">array.cpp</a></li>
</ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
width="100%"><tr>
=======================================
--- /trunk/libs/range/doc/html/range/faq.html Mon May 31 00:54:22 2010
+++ /trunk/libs/range/doc/html/range/faq.html Tue Jun 22 21:13:43 2010
@@ -3,11 +3,11 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>FAQ</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../index.html" title="Chapter 1. Range
2.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../index.html" title="Chapter 1. Range
2.0">
<link rel="up" href="../index.html" title="Chapter 1. Range 2.0">
-<link rel="prev" href="portability.html" title="Portability">
-<link rel="next" href="history_ack.html" title="History and
Acknowledgement">
+<link rel="prev" href="portability.html" title="Portability
可移植性">
+<link rel="next" href="history_ack.html" title="History and
Acknowledgement 历史和鸣谢">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,14 +22,17 @@
<div class="spirit-nav">
<a accesskey="p" href="portability.html"><img
src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../index.html"><img
src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h"
href="../index.html"><img src="../../../../../doc/html/images/home.png"
alt="Home"></a><a accesskey="n" href="history_ack.html"><img
src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="FAQ">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="range.faq"></a><a class="link" href="faq.html" title="FAQ">FAQ</a>
</h2></div></div></div>
<p>
1. <span class="emphasis"><em><span class="bold"><strong>Why is
there no difference between <code class="computeroutput"><span
class="identifier">range_iterator</span><span
class="special"><</span><span class="identifier">C</span><span
class="special">>::</span><span class="identifier">type</span></code>
and <code class="computeroutput"><span
class="identifier">range_const_iterator</span><span
class="special"><</span><span class="identifier">C</span><span
class="special">>::</span><span class="identifier">type</span></code>
- for <code class="computeroutput"><span
class="identifier">std</span><span class="special">::</span><span
class="identifier">pair</span><span class="special"><</span><span
class="identifier">iterator</span><span class="special">,</span> <span
class="identifier">iterator</span><span
class="special">></span></code>?</strong></span></em></span>
+ for <code class="computeroutput"><span
class="identifier">std</span><span class="special">::</span><span
class="identifier">pair</span><span class="special"><</span><span
class="identifier">iterator</span><span class="special">,</span> <span
class="identifier">iterator</span><span
class="special">></span></code>?<br>
+ 为什么对于 <code
class="computeroutput"><span class="identifier">std</span><span
class="special">::</span><span class="identifier">pair</span><span
class="special"><</span><span class="identifier">iterator</span><span
class="special">,</span> <span class="identifier">iterator</span><span
class="special">></span></code>,<code
class="computeroutput"><span class="identifier">range_iterator</span><span
class="special"><</span><span class="identifier">C</span><span
class="special">>::</span><span class="identifier">type</span></code>
+ 和 <code class="computeroutput"><span
class="identifier">range_const_iterator</span><span
class="special"><</span><span class="identifier">C</span><span
class="special">>::</span><span class="identifier">type</span></code>
+ 没有区别。</strong></span></em></span>
</p>
<div class="blockquote"><blockquote class="blockquote">
<p>
@@ -37,7 +40,9 @@
<p>
In general it is not possible nor desirable to find a
corresponding <code class="computeroutput"><span
class="identifier">const_iterator</span></code>. When it is possible to
come up with one, the client might choose to construct a <code
class="computeroutput"><span class="identifier">std</span><span
class="special">::</span><span class="identifier">pair</span><span
class="special"><</span><span
class="identifier">const_iterator</span><span class="special">,</span><span
class="identifier">const_iterator</span><span
class="special">></span></code>
- object.
+ object.<br>
通常没有可能也不值得找到一个
<code class="computeroutput"><span
class="identifier">const_iterator</span></code>.
如果要得到一个,用户可以选择构造一个
+ <code class="computeroutput"><span
class="identifier">std</span><span class="special">::</span><span
class="identifier">pair</span><span class="special"><</span><span
class="identifier">const_iterator</span><span class="special">,</span><span
class="identifier">const_iterator</span><span
class="special">></span></code>
+ 对象。
</p>
<p>
</p>
@@ -48,14 +53,15 @@
<p>
Note that an <a class="link"
href="reference/utilities/iterator_range.html" title="Class
iterator_range"><code class="computeroutput"><span
class="identifier">iterator_range</span></code></a> is somewhat more
convenient than a <code class="computeroutput"><span
class="identifier">pair</span></code>
- and that a <a class="link"
href="reference/utilities/sub_range.html" title="Class sub_range"><code
class="computeroutput"><span class="identifier">sub_range</span></code></a>
does propagate const-ness.
+ and that a <a class="link"
href="reference/utilities/sub_range.html" title="Class sub_range"><code
class="computeroutput"><span class="identifier">sub_range</span></code></a>
does propagate const-ness.<br>
+ 注意,<a class="link"
href="reference/utilities/iterator_range.html" title="Class
iterator_range"><code class="computeroutput"><span
class="identifier">iterator_range</span></code></a> 要比 <code
class="computeroutput"><span class="identifier">pair</span></code>
稍微方便一点,而 <a
class="link" href="reference/utilities/sub_range.html" title="Class
sub_range"><code class="computeroutput"><span
class="identifier">sub_range</span></code></a>
则可以传播常量性。
</p>
<p>
</p>
</blockquote></div>
<p>
2. <span class="emphasis"><em><span class="bold"><strong>Why is
there not supplied more types or
- more functions?</strong></span></em></span>
+ more functions?<br>
为什么不提供更多的类型或函数?</strong></span></em></span>
</p>
<div class="blockquote"><blockquote class="blockquote">
<p>
@@ -63,14 +69,14 @@
<p>
The library has been kept small because its current interface
will serve
most purposes. If and when a genuine need arises for more
functionality,
- it can be implemented.
+ it can be implemented.<br>
本库保持比较小是因为它当前的接口可以有更多的用途。如果真的需要更多的功能,它也可以实现。
</p>
<p>
</p>
</blockquote></div>
<p>
3. <span class="emphasis"><em><span class="bold"><strong>How should
I implement generic algorithms
- for ranges?</strong></span></em></span>
+ for ranges?<br>
我如何实现使用区间的泛型算法?</strong></span></em></span>
</p>
<div class="blockquote"><blockquote class="blockquote">
<p>
@@ -80,13 +86,16 @@
(or more) as input. Then use Boost.Range to build handier
versions on top
of the iterator based algorithm. Please notice that once the
range version
of the algorithm is done, it makes sense not to expose the
iterator version
- in the public interface.
+ in the public interface.<br>
你应该从接受两个(或多个)迭代器作为输入的泛型算法开始。然后使用
+ Boost.Range
在算法所基于的迭代器之上来构建一个手工版本。
+
请注意,一旦实现了算法的区间版本,就不要再将迭代器版本公开在公有接口上。
</p>
<p>
</p>
</blockquote></div>
<p>
- 4. <span class="emphasis"><em><span class="bold"><strong>Why is
there no Incrementable Range concept?</strong></span></em></span>
+ 4. <span class="emphasis"><em><span class="bold"><strong>Why is
there no Incrementable Range concept?<br>
+
为什么没有递增区间的概念?</strong></span></em></span>
</p>
<div class="blockquote"><blockquote class="blockquote">
<p>
@@ -94,7 +103,7 @@
<p>
Even though we speak of incrementable iterators, it would not
make much
sense for ranges; for example, we cannot determine the size and
emptiness
- of a range since we cannot even compare its iterators.
+ of a range since we cannot even compare its iterators.<br>
虽然我们有讨论递增迭代器,但是不太合适讨论这类区间;例如,我们无法确定区间的大小以及区间是否为空,因为我们不能比较这种迭代器。
</p>
<p>
</p>
@@ -104,7 +113,7 @@
</p>
<p>
Note also that incrementable iterators are derived from output
iterators
- and so there exist no output range.
+ and so there exist no output range.<br>
还应注意,递增迭代器派生自输出迭代器,所以也不存在输出区间。
</p>
<p>
</p>
=======================================
--- /trunk/libs/range/doc/html/range/history_ack.html Mon May 31 00:54:22
2010
+++ /trunk/libs/range/doc/html/range/history_ack.html Tue Jun 22 21:13:43
2010
@@ -1,10 +1,10 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>History and Acknowledgement</title>
+<title>History and Acknowledgement
历史和鸣谢</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../index.html" title="Chapter 1. Range
2.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../index.html" title="Chapter 1. Range
2.0">
<link rel="up" href="../index.html" title="Chapter 1. Range 2.0">
<link rel="prev" href="faq.html" title="FAQ">
</head>
@@ -21,12 +21,12 @@
<div class="spirit-nav">
<a accesskey="p" href="faq.html"><img
src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../index.html"><img
src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h"
href="../index.html"><img src="../../../../../doc/html/images/home.png"
alt="Home"></a>
</div>
-<div class="section" title="History and Acknowledgement">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="range.history_ack"></a><a class="link" href="history_ack.html"
title="History and Acknowledgement"> History and Acknowledgement</a>
+<a name="range.history_ack"></a><a class="link" href="history_ack.html"
title="History and Acknowledgement
历史和鸣谢"> History and Acknowledgement
历史和鸣谢</a>
</h2></div></div></div>
<a name="range.history_ack.version_1___before_boost_1_43"></a><h4>
-<a name="id2824280"></a>
+<a name="id5038286"></a>
<a class="link"
href="history_ack.html#range.history_ack.version_1___before_boost_1_43">Version
1 -
before Boost 1.43</a>
</h4>
@@ -58,20 +58,20 @@
<p>
Special thanks goes to
</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
Pavol Droba for help with documentation and implementation
</li>
-<li class="listitem">
+<li>
Pavel Vozenilek for help with porting the library
</li>
-<li class="listitem">
+<li>
Jonathan Turkanis and John Torjo for help with documentation
</li>
-<li class="listitem">
+<li>
Hartmut Kaiser for being review manager
</li>
-<li class="listitem">
+<li>
Jonathan Turkanis for porting the lib (as far sa possible) to vc6
and vc7.
</li>
</ul></div>
@@ -79,7 +79,7 @@
The concept checks and their documentation was provided by Daniel
Walker.
</p>
<a name="range.history_ack.version_2___boost_1_43_and_beyond"></a><h4>
-<a name="id2824384"></a>
+<a name="id4806669"></a>
<a class="link"
href="history_ack.html#range.history_ack.version_2___boost_1_43_and_beyond">Version
2 - Boost 1.43 and beyond</a>
</h4>
@@ -95,35 +95,35 @@
The people in the following list all made contributions in the form
of reviews,
user feedback, design suggestions, or defect detection:
</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
Thorsten Ottosen: review management, design advice, documentation
feedback
</li>
-<li class="listitem">
+<li>
Eric Niebler: feedback
</li>
-<li class="listitem">
+<li>
Joel de Guzman: review
</li>
-<li class="listitem">
+<li>
Mathias Gaunard: review
</li>
-<li class="listitem">
+<li>
David Abrahams: implementation advice
</li>
-<li class="listitem">
+<li>
Robert Jones: defect reports, usage feedback
</li>
-<li class="listitem">
+<li>
Sean Parent: contributed experience from the Adobe range library
</li>
-<li class="listitem">
+<li>
Arno Schoedl: implementations, and review
</li>
-<li class="listitem">
+<li>
Rogier van Dalen: review
</li>
-<li class="listitem">
+<li>
Vincente Botet: review, documentation feedback
</li>
</ul></div>
=======================================
--- /trunk/libs/range/doc/html/range/introduction.html Mon May 31 00:54:22
2010
+++ /trunk/libs/range/doc/html/range/introduction.html Tue Jun 22 21:13:43
2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Introduction</title>
+<title>Introduction 简介</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../index.html" title="Chapter 1. Range
2.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../index.html" title="Chapter 1. Range
2.0">
<link rel="up" href="../index.html" title="Chapter 1. Range 2.0">
<link rel="prev" href="../index.html" title="Chapter 1. Range
2.0">
-<link rel="next" href="concepts.html" title="Range Concepts">
+<link rel="next" href="concepts.html" title="Range Concepts
Range概念">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,9 +22,9 @@
<div class="spirit-nav">
<a accesskey="p" href="../index.html"><img
src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../index.html"><img
src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h"
href="../index.html"><img src="../../../../../doc/html/images/home.png"
alt="Home"></a><a accesskey="n" href="concepts.html"><img
src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Introduction">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="range.introduction"></a><a class="link" href="introduction.html"
title="Introduction">Introduction</a>
+<a name="range.introduction"></a><a class="link" href="introduction.html"
title="Introduction 简介"> Introduction 简介</a>
</h2></div></div></div>
<p>
Generic algorithms have so far been specified in terms of two or
more iterators.
@@ -32,8 +32,10 @@
work on. This leads to a very general interface, but also to a
somewhat clumsy
use of the algorithms with redundant specification of container
names. Therefore
we would like to raise the abstraction level for algorithms so they
specify
- their interface in terms of <a class="link" href="concepts.html"
title="Range Concepts">Ranges</a> as
- much as possible.
+ their interface in terms of <a class="link" href="concepts.html"
title="Range Concepts Range概念">Ranges</a> as
+ much as possible.<br>
当前的泛型算法是依据两个或多个迭代器来工作的。两个迭代器一起形成了算法所操作的值的区间。
+
这种方法是一种非常通用的接口,但是使用算法时也有点麻烦,常常要重复指定容器的名字。
+
因此我们希望提升算法的抽象层次,使它们尽可能以
<a class="link" href="concepts.html" title="Range Concepts
Range概念">Ranges</a>
来指定接口。
</p>
<p>
The most common form of ranges used throughout the C++ community are
standard
@@ -43,7 +45,9 @@
suitable layer of indirection is
applied</em></span></strong></span> . For example,
raw arrays are often suitable for use with generic code that works
with containers,
provided a suitable adapter is used. Likewise, null terminated
strings can
- be treated as containers of characters, if suitably adapted.
+ be treated as containers of characters, if suitably adapted.<br>
C++社区中最常见的区间形式是标准库的容器。不过在编写算法时,你常会发现,<span
class="bold"><strong>/如果有一个合适的间接层/</strong></span>,
应该让算法接受其它可提供足够功能的类型,以满足泛型代码的需要。
+
例如,裸数组常常可以与用于容器的泛型代码一起使用,只要使用一个适合的适配器。
+
同样的,null结尾的字符串也可被视为字符容器,如果经过适当的适配。
</p>
<p>
This library therefore provides the means to adapt standard-like
containers,
@@ -52,25 +56,31 @@
with them all. The basic idea is to add another layer of indirection
using
<a href="../../../../../libs/mpl/doc/refmanual/metafunction.html"
target="_top">metafunctions</a>
and free-standing functions so syntactic and/or semantic differences
can be
- removed.
+ removed.<br>
因此这个库提供了对近似于标准的容器、以空字符结束的字符串、迭代器的
+ <code class="computeroutput"><span
class="identifier">std</span><span class="special">::</span><span
class="identifier">pairs</span></code>,以及裸数组(及其它)进行改编的方法,
+
以便同一段泛型代码可以和它们一起使用。基本的想法是用
+ <a href="../../../../../libs/mpl/doc/refmanual/metafunction.html"
target="_top">metafunctions</a>
+
和独立的函数增加一个间接层,以去除语法和/或语义上的差别。
</p>
<p>
- The main advantages are
+ The main advantages are<br>
主要的好处有:
</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- simpler implementation and specification of generic range
algorithms
+<div class="itemizedlist"><ul type="disc">
+<li>
+ simpler implementation and specification of generic range
algorithms<br>
+
泛型的区间算法的更简单的实现和规范
</li>
-<li class="listitem">
- more flexible, compact and maintainable client code
+<li>
+ more flexible, compact and maintainable client code<br>
更灵活、紧凑和可维护的客户代码
</li>
-<li class="listitem">
+<li>
safe use of built-in arrays (for legacy code; why else would you
use built-in
- arrays?)
+ arrays?)<br>
安全使用内建数组(对于遗留代码;你为什么还要使用内建数据?)
</li>
</ul></div>
<p>
Below are given a small example (the complete example can be found
<a href="http://www.boost.org/libs/range/test/algorithm_example.cpp"
target="_top">here</a>
+ ):<br>
下面给出一个简短的例子(完整的例子代码请见
<a href="http://www.boost.org/libs/range/test/algorithm_example.cpp"
target="_top">这里</a>
):
</p>
<p>
@@ -78,6 +88,7 @@
</p>
<pre class="programlisting"><span class="comment">//
</span><span class="comment">// example: extracting bounds in a generic
algorithm
+</span><span class="comment">//
例子:在泛型算法中取出边界
</span><span class="comment">//
</span><span class="keyword">template</span><span
class="special"><</span> <span class="keyword">class</span> <span
class="identifier">ForwardReadableRange</span><span
class="special">,</span> <span class="keyword">class</span> <span
class="identifier">T</span> <span class="special">></span>
<span class="keyword">inline</span> <span class="keyword">typename</span>
<span class="identifier">boost</span><span class="special">::</span><span
class="identifier">range_iterator</span><span class="special"><</span>
<span class="identifier">ForwardReadableRange</span> <span
class="special">>::</span><span class="identifier">type</span>
@@ -95,6 +106,7 @@
<span class="comment">//
</span><span class="comment">// replace first value and return its index
+</span><span class="comment">//
替代第一个值并返回其索引
</span><span class="comment">//
</span><span class="keyword">template</span><span
class="special"><</span> <span class="keyword">class</span> <span
class="identifier">ForwardReadableWriteableRange</span><span
class="special">,</span> <span class="keyword">class</span> <span
class="identifier">T</span> <span class="special">></span>
<span class="keyword">inline</span> <span class="keyword">typename</span>
<span class="identifier">boost</span><span class="special">::</span><span
class="identifier">range_size</span><span class="special"><</span> <span
class="identifier">ForwardReadableWriteableRange</span> <span
class="special">>::</span><span class="identifier">type</span>
@@ -108,7 +120,7 @@
<span class="special">}</span>
<span class="comment">//
-</span><span class="comment">// usage
+</span><span class="comment">// usage 用法
</span><span class="comment">//
</span><span class="keyword">const</span> <span class="keyword">int</span>
<span class="identifier">N</span> <span class="special">=</span> <span
class="number">5</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span
class="identifier">vector</span><span class="special"><</span><span
class="keyword">int</span><span class="special">></span> <span
class="identifier">my_vector</span><span class="special">;</span>
@@ -135,7 +147,10 @@
and in the future. Notice that we have to provide two versions of
<code class="computeroutput"><span class="identifier">find</span><span
class="special">()</span></code> since
we cannot forward a non-const rvalue with reference arguments (see
this article
about <a
href="http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1385.htm"
target="_top">The
- Forwarding Problem</a> ).
+ Forwarding Problem</a> ).<br>
通过使用独立函数和 <a
href="../../../../../libs/mpl/doc/refmanual/metafunction.html"
target="_top">metafunctions</a>,这些代码可以自动用于本库支持的所有类型;现在以及将来。
+
注意,我们必须提供两个版本的
<code class="computeroutput"><span class="identifier">find</span><span
class="special">()</span></code>,因为我们不能将一个非常量右值前转到引用参数(有关
+ <a
href="http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1385.htm"
target="_top">The
+ Forwarding
Problem</a>,请见这篇文章)。
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
width="100%"><tr>
=======================================
--- /trunk/libs/range/doc/html/range/library_headers/adaptors.html Mon May
31 00:54:22 2010
+++ /trunk/libs/range/doc/html/range/library_headers/adaptors.html Tue Jun
22 21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Adaptors</title>
+<title>Adaptors 适配器</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../index.html" title="Chapter 1. Range
2.0">
-<link rel="up" href="../library_headers.html" title="Library Headers">
-<link rel="prev" href="general.html" title="General">
-<link rel="next" href="algorithm.html" title="Algorithm">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../library_headers.html" title="Library Headers
头文件">
+<link rel="prev" href="general.html" title="General 概述">
+<link rel="next" href="algorithm.html" title="Algorithm 算法">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,9 +22,9 @@
<div class="spirit-nav">
<a accesskey="p" href="general.html"><img
src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../library_headers.html"><img
src="../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../index.html"><img
src="../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="algorithm.html"><img
src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Adaptors">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="range.library_headers.adaptors"></a><a class="link"
href="adaptors.html" title="Adaptors">Adaptors</a>
+<a name="range.library_headers.adaptors"></a><a class="link"
href="adaptors.html" title="Adaptors 适配器"> Adaptors
适配器</a>
</h3></div></div></div>
<div class="informaltable"><table class="table">
<colgroup>
@@ -34,12 +34,12 @@
<thead><tr>
<th>
<p>
- Header
+ Header 头文件
</p>
</th>
<th>
<p>
- Includes
+ Includes 包含
</p>
</th>
</tr></thead>
=======================================
--- /trunk/libs/range/doc/html/range/library_headers/algorithm.html Mon May
31 00:54:22 2010
+++ /trunk/libs/range/doc/html/range/library_headers/algorithm.html Tue Jun
22 21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Algorithm</title>
+<title>Algorithm 算法</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../index.html" title="Chapter 1. Range
2.0">
-<link rel="up" href="../library_headers.html" title="Library Headers">
-<link rel="prev" href="adaptors.html" title="Adaptors">
-<link rel="next" href="algorithm_extensions.html" title="Algorithm
Extensions">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../library_headers.html" title="Library Headers
头文件">
+<link rel="prev" href="adaptors.html" title="Adaptors
适配器">
+<link rel="next" href="algorithm_extensions.html" title="Algorithm
Extensions 算法扩展">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,9 +22,9 @@
<div class="spirit-nav">
<a accesskey="p" href="adaptors.html"><img
src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../library_headers.html"><img
src="../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../index.html"><img
src="../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="algorithm_extensions.html"><img
src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Algorithm">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="range.library_headers.algorithm"></a><a class="link"
href="algorithm.html" title="Algorithm">Algorithm</a>
+<a name="range.library_headers.algorithm"></a><a class="link"
href="algorithm.html" title="Algorithm 算法"> Algorithm
算法</a>
</h3></div></div></div>
<div class="informaltable"><table class="table">
<colgroup>
@@ -34,12 +34,12 @@
<thead><tr>
<th>
<p>
- Header
+ Header 头文件
</p>
</th>
<th>
<p>
- Includes
+ Includes 包含
</p>
</th>
</tr></thead>
=======================================
---
/trunk/libs/range/doc/html/range/library_headers/algorithm_extensions.html
Mon May 31 00:54:22 2010
+++
/trunk/libs/range/doc/html/range/library_headers/algorithm_extensions.html
Tue Jun 22 21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Algorithm Extensions</title>
+<title>Algorithm Extensions 算法扩展</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../index.html" title="Chapter 1. Range
2.0">
-<link rel="up" href="../library_headers.html" title="Library Headers">
-<link rel="prev" href="algorithm.html" title="Algorithm">
-<link rel="next" href="../examples.html" title="Examples">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../library_headers.html" title="Library Headers
头文件">
+<link rel="prev" href="algorithm.html" title="Algorithm 算法">
+<link rel="next" href="../examples.html" title="Examples 示例">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,10 +22,10 @@
<div class="spirit-nav">
<a accesskey="p" href="algorithm.html"><img
src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../library_headers.html"><img
src="../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../index.html"><img
src="../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="../examples.html"><img
src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Algorithm Extensions">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="range.library_headers.algorithm_extensions"></a><a class="link"
href="algorithm_extensions.html" title="Algorithm Extensions">Algorithm
- Extensions</a>
+<a name="range.library_headers.algorithm_extensions"></a><a class="link"
href="algorithm_extensions.html" title="Algorithm Extensions
算法扩展"> Algorithm
+ Extensions 算法扩展</a>
</h3></div></div></div>
<div class="informaltable"><table class="table">
<colgroup>
@@ -35,12 +35,12 @@
<thead><tr>
<th>
<p>
- Header
+ Header 头文件
</p>
</th>
<th>
<p>
- Includes
+ Includes 包含
</p>
</th>
</tr></thead>
=======================================
--- /trunk/libs/range/doc/html/range/library_headers/general.html Mon May
31 00:54:22 2010
+++ /trunk/libs/range/doc/html/range/library_headers/general.html Tue Jun
22 21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>General</title>
+<title>General 概述</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../index.html" title="Chapter 1. Range
2.0">
-<link rel="up" href="../library_headers.html" title="Library Headers">
-<link rel="prev" href="../library_headers.html" title="Library Headers">
-<link rel="next" href="adaptors.html" title="Adaptors">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../library_headers.html" title="Library Headers
头文件">
+<link rel="prev" href="../library_headers.html" title="Library Headers
头文件">
+<link rel="next" href="adaptors.html" title="Adaptors
适配器">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,9 +22,9 @@
<div class="spirit-nav">
<a accesskey="p" href="../library_headers.html"><img
src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../library_headers.html"><img
src="../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../index.html"><img
src="../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="adaptors.html"><img
src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="General">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="range.library_headers.general"></a><a class="link"
href="general.html" title="General">General</a>
+<a name="range.library_headers.general"></a><a class="link"
href="general.html" title="General 概述"> General
概述</a>
</h3></div></div></div>
<div class="informaltable"><table class="table">
<colgroup>
@@ -35,17 +35,17 @@
<thead><tr>
<th>
<p>
- Header
+ Header 头文件
</p>
</th>
<th>
<p>
- Includes
+ Includes 包含
</p>
</th>
<th>
<p>
- Related Concept
+ Related Concept 相关概念
</p>
</th>
</tr></thead>
@@ -60,7 +60,8 @@
<p>
everything from Boost.Range version 1 (Boost versions
1.42 and
below). Includes the core range functions and
metafunctinos, but
- excludes Range Adaptors and Range Algorithms.
+ excludes Range Adaptors and Range Algorithms. <br>
Boost.Range
+ 版本1(Boost versions 1.42
及之前)的所有内容。包括核心的区间函数和元函数,但不包括区间适配器和区间算法
</p>
</td>
<td>
@@ -77,7 +78,7 @@
</td>
<td>
<p>
- every metafunction
+ every metafunction <br>
所有元函数
</p>
</td>
<td>
@@ -94,7 +95,7 @@
</td>
<td>
<p>
- every function
+ every function <br> 所有函数
</p>
</td>
<td>
@@ -111,12 +112,12 @@
</td>
<td>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions"><code class="computeroutput"><span
class="identifier">range_value</span></code></a>
+ <a class="link"
href="../reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions 元函数"><code
class="computeroutput"><span
class="identifier">range_value</span></code></a>
</p>
</td>
<td>
<p>
- <a class="link"
href="../concepts/single_pass_range.html" title="Single Pass Range">Single
Pass Range</a>
+ <a class="link"
href="../concepts/single_pass_range.html" title="Single Pass Range
单遍区间">Single Pass Range</a>
</p>
</td>
</tr>
@@ -128,12 +129,12 @@
</td>
<td>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions"><code class="computeroutput"><span
class="identifier">range_iterator</span></code></a>
+ <a class="link"
href="../reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions 元函数"><code
class="computeroutput"><span
class="identifier">range_iterator</span></code></a>
</p>
</td>
<td>
<p>
- <a class="link"
href="../concepts/single_pass_range.html" title="Single Pass Range">Single
Pass Range</a>
+ <a class="link"
href="../concepts/single_pass_range.html" title="Single Pass Range
单遍区间">Single Pass Range</a>
</p>
</td>
</tr>
@@ -145,12 +146,12 @@
</td>
<td>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions"><code class="computeroutput"><span
class="identifier">range_difference</span></code></a>
+ <a class="link"
href="../reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions 元函数"><code
class="computeroutput"><span
class="identifier">range_difference</span></code></a>
</p>
</td>
<td>
<p>
- <a class="link" href="../concepts/forward_range.html"
title="Forward Range">Forward Range</a>
+ <a class="link" href="../concepts/forward_range.html"
title="Forward Range 前向区间">Forward Range</a>
</p>
</td>
</tr>
@@ -162,7 +163,7 @@
</td>
<td>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions"><code class="computeroutput"><span
class="identifier">range_pointer</span></code></a>
+ <a class="link"
href="../reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions 元函数"><code
class="computeroutput"><span
class="identifier">range_pointer</span></code></a>
</p>
</td>
<td>
@@ -179,7 +180,7 @@
</td>
<td>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions"><code class="computeroutput"><span
class="identifier">range_category</span></code></a>
+ <a class="link"
href="../reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions 元函数"><code
class="computeroutput"><span
class="identifier">range_category</span></code></a>
</p>
</td>
<td>
@@ -196,12 +197,12 @@
</td>
<td>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions"><code class="computeroutput"><span
class="identifier">range_reverse_iterator</span></code></a>
+ <a class="link"
href="../reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions 元函数"><code
class="computeroutput"><span
class="identifier">range_reverse_iterator</span></code></a>
</p>
</td>
<td>
<p>
- <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional
Range">Bidirectional
+ <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
Range</a>
</p>
</td>
@@ -214,12 +215,12 @@
</td>
<td>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions"><code class="computeroutput"><span
class="identifier">begin</span></code></a> and <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions"><code class="computeroutput"><span
class="identifier">const_begin</span></code></a>
+ <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">begin</span></code></a> and <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">const_begin</span></code></a>
</p>
</td>
<td>
<p>
- <a class="link"
href="../concepts/single_pass_range.html" title="Single Pass Range">Single
Pass Range</a>
+ <a class="link"
href="../concepts/single_pass_range.html" title="Single Pass Range
单遍区间">Single Pass Range</a>
</p>
</td>
</tr>
@@ -231,12 +232,12 @@
</td>
<td>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions"><code class="computeroutput"><span
class="identifier">end</span></code></a> and <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions"><code class="computeroutput"><span
class="identifier">const_end</span></code></a>
+ <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">end</span></code></a> and <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">const_end</span></code></a>
</p>
</td>
<td>
<p>
- <a class="link"
href="../concepts/single_pass_range.html" title="Single Pass Range">Single
Pass Range</a>
+ <a class="link"
href="../concepts/single_pass_range.html" title="Single Pass Range
单遍区间">Single Pass Range</a>
</p>
</td>
</tr>
@@ -248,12 +249,12 @@
</td>
<td>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions"><code class="computeroutput"><span
class="identifier">empty</span></code></a>
+ <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">empty</span></code></a>
</p>
</td>
<td>
<p>
- <a class="link"
href="../concepts/single_pass_range.html" title="Single Pass Range">Single
Pass Range</a>
+ <a class="link"
href="../concepts/single_pass_range.html" title="Single Pass Range
单遍区间">Single Pass Range</a>
</p>
</td>
</tr>
@@ -265,12 +266,12 @@
</td>
<td>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions"><code class="computeroutput"><span
class="identifier">distance</span></code></a>
+ <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">distance</span></code></a>
</p>
</td>
<td>
<p>
- <a class="link" href="../concepts/forward_range.html"
title="Forward Range">Forward Range</a>
+ <a class="link" href="../concepts/forward_range.html"
title="Forward Range 前向区间">Forward Range</a>
</p>
</td>
</tr>
@@ -282,12 +283,12 @@
</td>
<td>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions"><code class="computeroutput"><span
class="identifier">size</span></code></a>
+ <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">size</span></code></a>
</p>
</td>
<td>
<p>
- <a class="link"
href="../concepts/random_access_range.html" title="Random Access
Range">Random Access
+ <a class="link"
href="../concepts/random_access_range.html" title="Random Access Range
随机访问区间">Random Access
Range</a>
</p>
</td>
@@ -300,12 +301,12 @@
</td>
<td>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions"><code class="computeroutput"><span
class="identifier">rbegin</span></code></a> and <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions"><code class="computeroutput"><span
class="identifier">const_rbegin</span></code></a>
+ <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">rbegin</span></code></a> and <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">const_rbegin</span></code></a>
</p>
</td>
<td>
<p>
- <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional
Range">Bidirectional
+ <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
Range</a>
</p>
</td>
@@ -318,12 +319,12 @@
</td>
<td>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions"><code class="computeroutput"><span
class="identifier">rend</span></code></a> and <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions"><code class="computeroutput"><span
class="identifier">const_rend</span></code></a>
+ <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">rend</span></code></a> and <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">const_rend</span></code></a>
</p>
</td>
<td>
<p>
- <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional
Range">Bidirectional
+ <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
Range</a>
</p>
</td>
@@ -336,7 +337,7 @@
</td>
<td>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions"><code class="computeroutput"><span
class="identifier">as_array</span></code></a>
+ <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">as_array</span></code></a>
</p>
</td>
<td>
@@ -353,7 +354,7 @@
</td>
<td>
<p>
- <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions"><code class="computeroutput"><span
class="identifier">as_literal</span></code></a>
+ <a class="link"
href="../reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">as_literal</span></code></a>
</p>
</td>
<td>
@@ -404,7 +405,7 @@
</td>
<td>
<p>
- <a class="link" href="../concepts.html" title="Range
Concepts">Range concepts</a>
+ <a class="link" href="../concepts.html" title="Range
Concepts Range概念">Range concepts</a>
</p>
</td>
<td>
@@ -421,7 +422,7 @@
</td>
<td>
<p>
- every range adaptor
+ every range adaptor <br>
所有区间适配器
</p>
</td>
<td>
@@ -438,7 +439,7 @@
</td>
<td>
<p>
- every range equivalent of an STL algorithm
+ every range equivalent of an STL algorithm <br>
所有与STL算法等效的区间算法
</p>
</td>
<td>
@@ -456,6 +457,7 @@
<td>
<p>
every range algorithm that is an extension of the STL
algorithms
+ <br>
所有作为STL算法扩展的区间算法
</p>
</td>
<td>
=======================================
--- /trunk/libs/range/doc/html/range/library_headers.html Mon May 31
00:54:22 2010
+++ /trunk/libs/range/doc/html/range/library_headers.html Tue Jun 22
21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Library Headers</title>
+<title>Library Headers 头文件</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../index.html" title="Chapter 1. Range
2.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../index.html" title="Chapter 1. Range
2.0">
<link rel="up" href="../index.html" title="Chapter 1. Range 2.0">
-<link rel="prev" href="style_guide.html" title="Terminology and style
guidelines">
-<link rel="next" href="library_headers/general.html" title="General">
+<link rel="prev" href="style_guide.html" title="Terminology and style
guidelines 术语与风格指导">
+<link rel="next" href="library_headers/general.html" title="General
概述">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,16 +22,16 @@
<div class="spirit-nav">
<a accesskey="p" href="style_guide.html"><img
src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../index.html"><img
src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h"
href="../index.html"><img src="../../../../../doc/html/images/home.png"
alt="Home"></a><a accesskey="n" href="library_headers/general.html"><img
src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Library Headers">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="range.library_headers"></a><a class="link"
href="library_headers.html" title="Library Headers">Library Headers</a>
+<a name="range.library_headers"></a><a class="link"
href="library_headers.html" title="Library Headers
头文件"> Library Headers 头文件</a>
</h2></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a
href="library_headers/general.html">General</a></span></dt>
-<dt><span class="section"><a
href="library_headers/adaptors.html">Adaptors</a></span></dt>
-<dt><span class="section"><a
href="library_headers/algorithm.html">Algorithm</a></span></dt>
-<dt><span class="section"><a
href="library_headers/algorithm_extensions.html">Algorithm
- Extensions</a></span></dt>
+<dt><span class="section"><a href="library_headers/general.html"> General
概述</a></span></dt>
+<dt><span class="section"><a href="library_headers/adaptors.html">
Adaptors 适配器</a></span></dt>
+<dt><span class="section"><a href="library_headers/algorithm.html">
Algorithm 算法</a></span></dt>
+<dt><span class="section"><a
href="library_headers/algorithm_extensions.html"> Algorithm
+ Extensions 算法扩展</a></span></dt>
</dl></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
width="100%"><tr>
=======================================
--- /trunk/libs/range/doc/html/range/mfc_atl/atl_ranges.html Mon May 31
00:54:22 2010
+++ /trunk/libs/range/doc/html/range/mfc_atl/atl_ranges.html Tue Jun 22
21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>ATL Ranges</title>
+<title>ATL Ranges ATL区间</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../index.html" title="Chapter 1. Range
2.0">
-<link rel="up" href="../mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke
Sogame)">
-<link rel="prev" href="mfc_ranges.html" title="MFC Ranges">
-<link rel="next" href="const_ranges.html" title="const Ranges">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke
Sogame 由 Shunsuke Sogame 贡献)">
+<link rel="prev" href="mfc_ranges.html" title="MFC Ranges
MFC区间">
+<link rel="next" href="const_ranges.html" title="const Ranges
常量区间">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,16 +22,18 @@
<div class="spirit-nav">
<a accesskey="p" href="mfc_ranges.html"><img
src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../mfc_atl.html"><img
src="../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../index.html"><img
src="../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="const_ranges.html"><img
src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="ATL Ranges">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="range.mfc_atl.atl_ranges"></a><a class="link"
href="atl_ranges.html" title="ATL Ranges"> ATL Ranges</a>
+<a name="range.mfc_atl.atl_ranges"></a><a class="link"
href="atl_ranges.html" title="ATL Ranges ATL区间"> ATL Ranges
ATL区间</a>
</h3></div></div></div>
<p>
If the <code class="computeroutput"><span
class="special"><</span><span class="identifier">boost</span><span
class="special">/</span><span class="identifier">range</span><span
class="special">/</span><span class="identifier">atl</span><span
class="special">.</span><span class="identifier">hpp</span><span
class="special">></span></code>
is included before or after Boost.Range headers, the ATL
collections and
strings become models of Range. The table below lists the
Traversal Category
and <code class="computeroutput"><span
class="identifier">range_reference</span></code> of ATL
- ranges.
+ ranges.<br> 如果 <code class="computeroutput"><span
class="special"><</span><span class="identifier">boost</span><span
class="special">/</span><span class="identifier">range</span><span
class="special">/</span><span class="identifier">atl</span><span
class="special">.</span><span class="identifier">hpp</span><span
class="special">></span></code>
+ 在 Boost.Range
头文件之前或之后被包含,则
ATL
集合和字符串类型就成为了
+ Range 的 model. 下表列出了 ATL
区间的遍历类别和 <code
class="computeroutput"><span
class="identifier">range_reference</span></code> .
</p>
<div class="informaltable"><table class="table">
<colgroup>
@@ -42,12 +44,12 @@
<thead><tr>
<th>
<p>
- Range
+ Range 区间
</p>
</th>
<th>
<p>
- Traversal Category
+ Traversal Category 遍历类别
</p>
</th>
<th>
@@ -65,7 +67,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/random_access_range.html" title="Random Access
Range">Random Access
+ <a class="link"
href="../concepts/random_access_range.html" title="Random Access Range
随机访问区间">Random Access
Range</a>
</p>
</td>
@@ -83,7 +85,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/random_access_range.html" title="Random Access
Range">Random Access
+ <a class="link"
href="../concepts/random_access_range.html" title="Random Access Range
随机访问区间">Random Access
Range</a>
</p>
</td>
@@ -101,7 +103,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/random_access_range.html" title="Random Access
Range">Random Access
+ <a class="link"
href="../concepts/random_access_range.html" title="Random Access Range
随机访问区间">Random Access
Range</a>
</p>
</td>
@@ -119,7 +121,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional
Range">Bidirectional
+ <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
Range</a>
</p>
</td>
@@ -137,7 +139,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional
Range">Bidirectional
+ <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
Range</a>
</p>
</td>
@@ -155,7 +157,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional
Range">Bidirectional
+ <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
Range</a>
</p>
</td>
@@ -173,7 +175,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional
Range">Bidirectional
+ <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
Range</a>
</p>
</td>
@@ -191,7 +193,7 @@
</td>
<td>
<p>
- <a class="link" href="../concepts/forward_range.html"
title="Forward Range">Forward Range</a>
+ <a class="link" href="../concepts/forward_range.html"
title="Forward Range 前向区间">Forward Range</a>
</p>
</td>
<td>
@@ -208,7 +210,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional
Range">Bidirectional
+ <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
Range</a>
</p>
</td>
@@ -226,7 +228,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional
Range">Bidirectional
+ <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
Range</a>
</p>
</td>
@@ -244,7 +246,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional
Range">Bidirectional
+ <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
Range</a>
</p>
</td>
@@ -262,7 +264,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/random_access_range.html" title="Random Access
Range">Random Access
+ <a class="link"
href="../concepts/random_access_range.html" title="Random Access Range
随机访问区间">Random Access
Range</a>
</p>
</td>
@@ -280,7 +282,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/random_access_range.html" title="Random Access
Range">Random Access
+ <a class="link"
href="../concepts/random_access_range.html" title="Random Access Range
随机访问区间">Random Access
Range</a>
</p>
</td>
@@ -298,7 +300,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/random_access_range.html" title="Random Access
Range">Random Access
+ <a class="link"
href="../concepts/random_access_range.html" title="Random Access Range
随机访问区间">Random Access
Range</a>
</p>
</td>
@@ -316,7 +318,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/random_access_range.html" title="Random Access
Range">Random Access
+ <a class="link"
href="../concepts/random_access_range.html" title="Random Access Range
随机访问区间">Random Access
Range</a>
</p>
</td>
@@ -334,7 +336,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/random_access_range.html" title="Random Access
Range">Random Access
+ <a class="link"
href="../concepts/random_access_range.html" title="Random Access Range
随机访问区间">Random Access
Range</a>
</p>
</td>
@@ -355,7 +357,13 @@
<code class="computeroutput"><span
class="identifier">range_difference</span><span
class="special"><</span><span class="identifier">Range</span><span
class="special">>::</span><span class="identifier">type</span></code> is
the same as <code class="computeroutput"><span
class="identifier">std</span><span class="special">::</span><span
class="identifier">ptrdiff_t</span></code>,
and <code class="computeroutput"><span
class="identifier">range_pointer</span><span
class="special"><</span><span class="identifier">Range</span><span
class="special">>::</span><span class="identifier">type</span></code> is
the same as <code class="computeroutput"><span
class="identifier">add_pointer</span><span class="special"><</span><span
class="identifier">remove_reference</span><span
class="special"><</span><span class="identifier">Ref</span><span
class="special">>::</span><span class="identifier">type</span><span
class="special">>::</span><span class="identifier">type</span></code>.
As for <code class="computeroutput"><span
class="keyword">const</span> <span class="identifier">Range</span></code>,
- see below.
+ see below.<br> 其它 <a class="link"
href="../../index.html" title="Chapter 1. Range
2.0">Boost.Range</a>
元函数定义如下。其中
+ <code class="computeroutput"><span
class="identifier">Range</span></code>
为以上所列的任一类型,<code
class="computeroutput"><span class="identifier">ReF</span></code> 与
<code class="computeroutput"><span
class="identifier">range_reference</span><span
class="special"><</span><span class="identifier">Range</span><span
class="special">>::</span><span class="identifier">type</span></code>
+ 相同。 <code class="computeroutput"><span
class="identifier">range_value</span><span class="special"><</span><span
class="identifier">Range</span><span class="special">>::</span><span
class="identifier">type</span></code> 与 <code
class="computeroutput"><span
class="identifier">remove_reference</span><span
class="special"><</span><span
class="identifier">remove_const</span><span
class="special"><</span><span class="identifier">Ref</span><span
class="special">>::</span><span class="identifier">type</span><span
class="special">>::</span><span class="identifier">type</span></code>
+ 相同,<code class="computeroutput"><span
class="identifier">range_difference</span><span
class="special"><</span><span class="identifier">Range</span><span
class="special">>::</span><span class="identifier">type</span></code>
+ 与 <code class="computeroutput"><span
class="identifier">std</span><span class="special">::</span><span
class="identifier">ptrdiff_t</span></code> 相同,而
<code class="computeroutput"><span
class="identifier">range_pointer</span><span
class="special"><</span><span class="identifier">Range</span><span
class="special">>::</span><span class="identifier">type</span></code>
+ 与 <code class="computeroutput"><span
class="identifier">add_pointer</span><span class="special"><</span><span
class="identifier">remove_reference</span><span
class="special"><</span><span class="identifier">Ref</span><span
class="special">>::</span><span class="identifier">type</span><span
class="special">>::</span><span class="identifier">type</span></code>
相同。 对于 <code
class="computeroutput"><span class="keyword">const</span>
+ <span
class="identifier">Range</span></code>,请见下文。
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
width="100%"><tr>
=======================================
--- /trunk/libs/range/doc/html/range/mfc_atl/const_ranges.html Mon May 31
00:54:22 2010
+++ /trunk/libs/range/doc/html/range/mfc_atl/const_ranges.html Tue Jun 22
21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>const Ranges</title>
+<title>const Ranges 常量区间</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../index.html" title="Chapter 1. Range
2.0">
-<link rel="up" href="../mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke
Sogame)">
-<link rel="prev" href="atl_ranges.html" title="ATL Ranges">
-<link rel="next" href="references.html" title="References">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke
Sogame 由 Shunsuke Sogame 贡献)">
+<link rel="prev" href="atl_ranges.html" title="ATL Ranges
ATL区间">
+<link rel="next" href="references.html" title="References
参考">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,15 +22,19 @@
<div class="spirit-nav">
<a accesskey="p" href="atl_ranges.html"><img
src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../mfc_atl.html"><img
src="../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../index.html"><img
src="../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="references.html"><img
src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="const Ranges">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="range.mfc_atl.const_ranges"></a><a class="link"
href="const_ranges.html" title="const Ranges"> const Ranges</a>
+<a name="range.mfc_atl.const_ranges"></a><a class="link"
href="const_ranges.html" title="const Ranges
常量区间"> const Ranges
常量区间</a>
</h3></div></div></div>
<p>
<code class="computeroutput"><span
class="identifier">range_reference</span><span
class="special"><</span><span class="keyword">const</span> <span
class="identifier">Range</span><span class="special">>::</span><span
class="identifier">type</span></code>
is defined by the following algorithm. Let <code
class="computeroutput"><span class="identifier">Range</span></code>
be any type listed above and <code class="computeroutput"><span
class="identifier">Ref</span></code>
- be the same as <code class="computeroutput"><span
class="identifier">range_reference</span><span
class="special"><</span><span class="identifier">Range</span><span
class="special">>::</span><span class="identifier">type</span></code>.
+ be the same as <code class="computeroutput"><span
class="identifier">range_reference</span><span
class="special"><</span><span class="identifier">Range</span><span
class="special">>::</span><span
class="identifier">type</span></code>.<br>
+ <code class="computeroutput"><span
class="identifier">range_reference</span><span
class="special"><</span><span class="keyword">const</span> <span
class="identifier">Range</span><span class="special">>::</span><span
class="identifier">type</span></code>
+
由以下算法定义。其中
<code class="computeroutput"><span class="identifier">Range</span></code>
+
为以上所列的任一类型,<code
class="computeroutput"><span class="identifier">ReF</span></code>
+ 与 <code class="computeroutput"><span
class="identifier">range_reference</span><span
class="special"><</span><span class="identifier">Range</span><span
class="special">>::</span><span class="identifier">type</span></code>
相同。
</p>
<p>
@@ -49,7 +53,8 @@
<p>
</p>
<p>
- Other Boost.Range metafunctions are defined by the following.
+ Other Boost.Range metafunctions are defined by the following.<br>
其它
+ Boost.Range
元函数定义如下。
</p>
<div class="informaltable"><table class="table">
<colgroup>
@@ -59,12 +64,12 @@
<thead><tr>
<th>
<p>
- Range metafunction
+ Range metafunction
区间元函数
</p>
</th>
<th>
<p>
- Result
+ Result 结果
</p>
</th>
</tr></thead>
=======================================
--- /trunk/libs/range/doc/html/range/mfc_atl/mfc_ranges.html Mon May 31
00:54:22 2010
+++ /trunk/libs/range/doc/html/range/mfc_atl/mfc_ranges.html Tue Jun 22
21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>MFC Ranges</title>
+<title>MFC Ranges MFC区间</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../index.html" title="Chapter 1. Range
2.0">
-<link rel="up" href="../mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke
Sogame)">
-<link rel="prev" href="requirements.html" title="Requirements">
-<link rel="next" href="atl_ranges.html" title="ATL Ranges">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke
Sogame 由 Shunsuke Sogame 贡献)">
+<link rel="prev" href="requirements.html" title="Requirements
要求">
+<link rel="next" href="atl_ranges.html" title="ATL Ranges
ATL区间">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,16 +22,18 @@
<div class="spirit-nav">
<a accesskey="p" href="requirements.html"><img
src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../mfc_atl.html"><img
src="../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../index.html"><img
src="../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="atl_ranges.html"><img
src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="MFC Ranges">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="range.mfc_atl.mfc_ranges"></a><a class="link"
href="mfc_ranges.html" title="MFC Ranges"> MFC Ranges</a>
+<a name="range.mfc_atl.mfc_ranges"></a><a class="link"
href="mfc_ranges.html" title="MFC Ranges MFC区间"> MFC Ranges
MFC区间</a>
</h3></div></div></div>
<p>
If the <code class="computeroutput"><span
class="special"><</span><span class="identifier">boost</span><span
class="special">/</span><span class="identifier">range</span><span
class="special">/</span><span class="identifier">mfc</span><span
class="special">.</span><span class="identifier">hpp</span><span
class="special">></span></code>
is included before or after Boost.Range headers, the MFC
collections and
strings become models of Range. The table below lists the
Traversal Category
and <code class="computeroutput"><span
class="identifier">range_reference</span></code> of MFC
- ranges.
+ ranges.<br> 如果 <code class="computeroutput"><span
class="special"><</span><span class="identifier">boost</span><span
class="special">/</span><span class="identifier">range</span><span
class="special">/</span><span class="identifier">mfc</span><span
class="special">.</span><span class="identifier">hpp</span><span
class="special">></span></code>
+ 在 Boost.Range
头文件之前或之后被包含,则
MFC
的集合和字符串类型就成为了
+ Range 的 Model. 下表列出了 MFC
区间的遍历类别和 <code
class="computeroutput"><span
class="identifier">range_reference</span></code> .
</p>
<div class="informaltable"><table class="table">
<colgroup>
@@ -42,12 +44,12 @@
<thead><tr>
<th>
<p>
- Range
+ Range 区间
</p>
</th>
<th>
<p>
- Traversal Category
+ Traversal Category 遍历类别
</p>
</th>
<th>
@@ -65,7 +67,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/random_access_range.html" title="Random Access
Range">Random Access
+ <a class="link"
href="../concepts/random_access_range.html" title="Random Access Range
随机访问区间">Random Access
Range</a>
</p>
</td>
@@ -83,7 +85,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional
Range">Bidirectional
+ <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
Range</a>
</p>
</td>
@@ -101,7 +103,7 @@
</td>
<td>
<p>
- <a class="link" href="../concepts/forward_range.html"
title="Forward Range">Forward Range</a>
+ <a class="link" href="../concepts/forward_range.html"
title="Forward Range 前向区间">Forward Range</a>
</p>
</td>
<td>
@@ -118,7 +120,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/random_access_range.html" title="Random Access
Range">Random Access
+ <a class="link"
href="../concepts/random_access_range.html" title="Random Access Range
随机访问区间">Random Access
Range</a>
</p>
</td>
@@ -137,7 +139,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional
Range">Bidirectional
+ <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
Range</a>
</p>
</td>
@@ -156,7 +158,7 @@
</td>
<td>
<p>
- <a class="link" href="../concepts/forward_range.html"
title="Forward Range">Forward Range</a>
+ <a class="link" href="../concepts/forward_range.html"
title="Forward Range 前向区间">Forward Range</a>
</p>
</td>
<td>
@@ -174,7 +176,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/random_access_range.html" title="Random Access
Range">Random Access
+ <a class="link"
href="../concepts/random_access_range.html" title="Random Access Range
随机访问区间">Random Access
Range</a>
</p>
</td>
@@ -192,7 +194,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/random_access_range.html" title="Random Access
Range">Random Access
+ <a class="link"
href="../concepts/random_access_range.html" title="Random Access Range
随机访问区间">Random Access
Range</a>
</p>
</td>
@@ -210,7 +212,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/random_access_range.html" title="Random Access
Range">Random Access
+ <a class="link"
href="../concepts/random_access_range.html" title="Random Access Range
随机访问区间">Random Access
Range</a>
</p>
</td>
@@ -228,7 +230,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/random_access_range.html" title="Random Access
Range">Random Access
+ <a class="link"
href="../concepts/random_access_range.html" title="Random Access Range
随机访问区间">Random Access
Range</a>
</p>
</td>
@@ -246,7 +248,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/random_access_range.html" title="Random Access
Range">Random Access
+ <a class="link"
href="../concepts/random_access_range.html" title="Random Access Range
随机访问区间">Random Access
Range</a>
</p>
</td>
@@ -264,7 +266,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/random_access_range.html" title="Random Access
Range">Random Access
+ <a class="link"
href="../concepts/random_access_range.html" title="Random Access Range
随机访问区间">Random Access
Range</a>
</p>
</td>
@@ -282,7 +284,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/random_access_range.html" title="Random Access
Range">Random Access
+ <a class="link"
href="../concepts/random_access_range.html" title="Random Access Range
随机访问区间">Random Access
Range</a>
</p>
</td>
@@ -300,7 +302,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional
Range">Bidirectional
+ <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
Range</a>
</p>
</td>
@@ -318,7 +320,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional
Range">Bidirectional
+ <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
Range</a>
</p>
</td>
@@ -336,7 +338,7 @@
</td>
<td>
<p>
- <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional
Range">Bidirectional
+ <a class="link"
href="../concepts/bidirectional_range.html" title="Bidirectional Range
双向区间">Bidirectional
Range</a>
</p>
</td>
@@ -354,7 +356,7 @@
</td>
<td>
<p>
- <a class="link" href="../concepts/forward_range.html"
title="Forward Range">Forward Range</a>
+ <a class="link" href="../concepts/forward_range.html"
title="Forward Range 前向区间">Forward Range</a>
</p>
</td>
<td>
@@ -372,7 +374,7 @@
</td>
<td>
<p>
- <a class="link" href="../concepts/forward_range.html"
title="Forward Range">Forward Range</a>
+ <a class="link" href="../concepts/forward_range.html"
title="Forward Range 前向区间">Forward Range</a>
</p>
</td>
<td>
@@ -390,7 +392,7 @@
</td>
<td>
<p>
- <a class="link" href="../concepts/forward_range.html"
title="Forward Range">Forward Range</a>
+ <a class="link" href="../concepts/forward_range.html"
title="Forward Range 前向区间">Forward Range</a>
</p>
</td>
<td>
@@ -408,7 +410,7 @@
</td>
<td>
<p>
- <a class="link" href="../concepts/forward_range.html"
title="Forward Range">Forward Range</a>
+ <a class="link" href="../concepts/forward_range.html"
title="Forward Range 前向区间">Forward Range</a>
</p>
</td>
<td>
@@ -425,7 +427,7 @@
</td>
<td>
<p>
- <a class="link" href="../concepts/forward_range.html"
title="Forward Range">Forward Range</a>
+ <a class="link" href="../concepts/forward_range.html"
title="Forward Range 前向区间">Forward Range</a>
</p>
</td>
<td>
@@ -443,7 +445,7 @@
</td>
<td>
<p>
- <a class="link" href="../concepts/forward_range.html"
title="Forward Range">Forward Range</a>
+ <a class="link" href="../concepts/forward_range.html"
title="Forward Range 前向区间">Forward Range</a>
</p>
</td>
<td>
@@ -461,7 +463,12 @@
<code class="computeroutput"><span
class="identifier">range_difference</span><span
class="special"><</span><span class="identifier">Range</span><span
class="special">>::</span><span class="identifier">type</span></code> is
the same as <code class="computeroutput"><span
class="identifier">std</span><span class="special">::</span><span
class="identifier">ptrdiff_t</span></code>,
and <code class="computeroutput"><span
class="identifier">range_pointer</span><span
class="special"><</span><span class="identifier">Range</span><span
class="special">>::</span><span class="identifier">type</span></code> is
the same as <code class="computeroutput"><span
class="identifier">add_pointer</span><span class="special"><</span><span
class="identifier">remove_reference</span><span
class="special"><</span><span class="identifier">Ref</span><span
class="special">>::</span><span class="identifier">type</span><span
class="special">>::</span><span class="identifier">type</span></code>.
As for <code class="computeroutput"><span
class="keyword">const</span> <span class="identifier">Range</span></code>,
- see below.
+ see below.<br> 其它 Boost.Range
元函数定义如下。其中
<code class="computeroutput"><span class="identifier">Range</span></code>
为以上所列的任一类型,<code
class="computeroutput"><span class="identifier">ReF</span></code> 与
<code class="computeroutput"><span
class="identifier">range_reference</span><span
class="special"><</span><span class="identifier">Range</span><span
class="special">>::</span><span class="identifier">type</span></code>
+ 相同。 <code class="computeroutput"><span
class="identifier">range_value</span><span class="special"><</span><span
class="identifier">Range</span><span class="special">>::</span><span
class="identifier">type</span></code> 与 <code
class="computeroutput"><span
class="identifier">remove_reference</span><span
class="special"><</span><span
class="identifier">remove_const</span><span
class="special"><</span><span class="identifier">Ref</span><span
class="special">>::</span><span class="identifier">type</span><span
class="special">>::</span><span class="identifier">type</span></code>
+ 相同,<code class="computeroutput"><span
class="identifier">range_difference</span><span
class="special"><</span><span class="identifier">Range</span><span
class="special">>::</span><span class="identifier">type</span></code>
+ 与 <code class="computeroutput"><span
class="identifier">std</span><span class="special">::</span><span
class="identifier">ptrdiff_t</span></code> 相同,而
<code class="computeroutput"><span
class="identifier">range_pointer</span><span
class="special"><</span><span class="identifier">Range</span><span
class="special">>::</span><span class="identifier">type</span></code>
+ 与 <code class="computeroutput"><span
class="identifier">add_pointer</span><span class="special"><</span><span
class="identifier">remove_reference</span><span
class="special"><</span><span class="identifier">Ref</span><span
class="special">>::</span><span class="identifier">type</span><span
class="special">>::</span><span class="identifier">type</span></code>
相同。 对于 <code
class="computeroutput"><span class="keyword">const</span>
+ <span
class="identifier">Range</span></code>,请见下文。
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
width="100%"><tr>
=======================================
--- /trunk/libs/range/doc/html/range/mfc_atl/references.html Mon May 31
00:54:22 2010
+++ /trunk/libs/range/doc/html/range/mfc_atl/references.html Tue Jun 22
21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>References</title>
+<title>References 参考</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../index.html" title="Chapter 1. Range
2.0">
-<link rel="up" href="../mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke
Sogame)">
-<link rel="prev" href="const_ranges.html" title="const Ranges">
-<link rel="next" href="../upgrade.html" title="Upgrade version of
Boost.Range">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke
Sogame 由 Shunsuke Sogame 贡献)">
+<link rel="prev" href="const_ranges.html" title="const Ranges
常量区间">
+<link rel="next" href="../upgrade.html" title="Upgrade version of
Boost.Range Boost.Range的升级版本">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,15 +22,15 @@
<div class="spirit-nav">
<a accesskey="p" href="const_ranges.html"><img
src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../mfc_atl.html"><img
src="../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../index.html"><img
src="../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="../upgrade.html"><img
src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="References">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="range.mfc_atl.references"></a><a class="link"
href="references.html" title="References"> References</a>
+<a name="range.mfc_atl.references"></a><a class="link"
href="references.html" title="References 参考"> References
参考</a>
</h3></div></div></div>
-<div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem"><a class="link" href="../../index.html"
title="Chapter 1. Range 2.0">Boost.Range</a></li>
-<li class="listitem"><a
href="http://msdn.microsoft.com/en-us/library/942860sh.aspx"
target="_top">MFC
+<div class="orderedlist"><ol type="1">
+<li><a class="link" href="../../index.html"
title="Chapter 1. Range 2.0">Boost.Range</a></li>
+<li><a href="http://msdn.microsoft.com/en-us/library/942860sh.aspx"
target="_top">MFC
Collection Classes</a></li>
-<li class="listitem"><a
href="http://msdn.microsoft.com/en-us/library/15e672bd.aspx"
target="_top">ATL
+<li><a href="http://msdn.microsoft.com/en-us/library/15e672bd.aspx"
target="_top">ATL
Collection Classes</a></li>
</ol></div>
</div>
=======================================
--- /trunk/libs/range/doc/html/range/mfc_atl/requirements.html Mon May 31
00:54:22 2010
+++ /trunk/libs/range/doc/html/range/mfc_atl/requirements.html Tue Jun 22
21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Requirements</title>
+<title>Requirements 要求</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../index.html" title="Chapter 1. Range
2.0">
-<link rel="up" href="../mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke
Sogame)">
-<link rel="prev" href="../mfc_atl.html" title="MFC/ATL (courtesy of
Shunsuke Sogame)">
-<link rel="next" href="mfc_ranges.html" title="MFC Ranges">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke
Sogame 由 Shunsuke Sogame 贡献)">
+<link rel="prev" href="../mfc_atl.html" title="MFC/ATL (courtesy of
Shunsuke Sogame 由 Shunsuke Sogame 贡献)">
+<link rel="next" href="mfc_ranges.html" title="MFC Ranges
MFC区间">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,16 +22,18 @@
<div class="spirit-nav">
<a accesskey="p" href="../mfc_atl.html"><img
src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../mfc_atl.html"><img
src="../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../index.html"><img
src="../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="mfc_ranges.html"><img
src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Requirements">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="range.mfc_atl.requirements"></a><a class="link"
href="requirements.html" title="Requirements"> Requirements</a>
+<a name="range.mfc_atl.requirements"></a><a class="link"
href="requirements.html" title="Requirements 要求">
Requirements 要求</a>
</h3></div></div></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- Boost C++ Libraries Version 1.34.0 or later (no compilation
required)
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Boost C++ Libraries Version 1.34.0 or later (no compilation
required)<br>
+ Boost C++ Libraries Version 1.34.0
或以后版本(无需编译)
</li>
-<li class="listitem">
- Visual C++ 7.1 or later (for MFC and ATL)
+<li>
+ Visual C++ 7.1 or later (for MFC and ATL)<br> Visual C++ 7.1
或以后版本(对于
+ MFC 和 ATL)
</li>
</ul></div>
</div>
=======================================
--- /trunk/libs/range/doc/html/range/mfc_atl.html Mon May 31 00:54:22 2010
+++ /trunk/libs/range/doc/html/range/mfc_atl.html Tue Jun 22 21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>MFC/ATL (courtesy of Shunsuke Sogame)</title>
+<title>MFC/ATL (courtesy of Shunsuke Sogame 由 Shunsuke Sogame
贡献)</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../index.html" title="Chapter 1. Range
2.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../index.html" title="Chapter 1. Range
2.0">
<link rel="up" href="../index.html" title="Chapter 1. Range 2.0">
-<link rel="prev" href="examples.html" title="Examples">
-<link rel="next" href="mfc_atl/requirements.html" title="Requirements">
+<link rel="prev" href="examples.html" title="Examples 示例">
+<link rel="next" href="mfc_atl/requirements.html" title="Requirements
要求">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,24 +22,26 @@
<div class="spirit-nav">
<a accesskey="p" href="examples.html"><img
src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../index.html"><img
src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h"
href="../index.html"><img src="../../../../../doc/html/images/home.png"
alt="Home"></a><a accesskey="n" href="mfc_atl/requirements.html"><img
src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="MFC/ATL (courtesy of Shunsuke Sogame)">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="range.mfc_atl"></a><a class="link" href="mfc_atl.html"
title="MFC/ATL (courtesy of Shunsuke Sogame)"> MFC/ATL (courtesy of
Shunsuke Sogame)</a>
+<a name="range.mfc_atl"></a><a class="link" href="mfc_atl.html"
title="MFC/ATL (courtesy of Shunsuke Sogame 由 Shunsuke Sogame
贡献)"> MFC/ATL (courtesy of Shunsuke Sogame 由
+ Shunsuke Sogame 贡献)</a>
</h2></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="mfc_atl/requirements.html">
Requirements</a></span></dt>
-<dt><span class="section"><a href="mfc_atl/mfc_ranges.html"> MFC
Ranges</a></span></dt>
-<dt><span class="section"><a href="mfc_atl/atl_ranges.html"> ATL
Ranges</a></span></dt>
-<dt><span class="section"><a href="mfc_atl/const_ranges.html"> const
Ranges</a></span></dt>
-<dt><span class="section"><a href="mfc_atl/references.html">
References</a></span></dt>
+<dt><span class="section"><a href="mfc_atl/requirements.html">
Requirements 要求</a></span></dt>
+<dt><span class="section"><a href="mfc_atl/mfc_ranges.html"> MFC Ranges
MFC区间</a></span></dt>
+<dt><span class="section"><a href="mfc_atl/atl_ranges.html"> ATL Ranges
ATL区间</a></span></dt>
+<dt><span class="section"><a href="mfc_atl/const_ranges.html"> const
Ranges 常量区间</a></span></dt>
+<dt><span class="section"><a href="mfc_atl/references.html"> References
参考</a></span></dt>
</dl></div>
-<a name="range.mfc_atl.introduction"></a><h5>
-<a name="id2817920"></a>
- <a class="link"
href="mfc_atl.html#range.mfc_atl.introduction">Introduction</a>
+<a name="range.mfc_atl.introduction_______"></a><h5>
+<a name="id5030214"></a>
+ <a class="link"
href="mfc_atl.html#range.mfc_atl.introduction_______">Introduction
简介</a>
</h5>
<p>
This implementation was kindly donated by Shunsuke Sogame. This
header adapts
- MFC and ATL containers to the appropriate Range concepts.
+ MFC and ATL containers to the appropriate Range concepts.<br>
本实现由
+ Shunsuke Sogame
贡献。该头文件将 MFC
和 ATL
容器适配为适当的区间概念。
</p>
<div class="informaltable"><table class="table">
<colgroup>
@@ -99,13 +101,14 @@
</tr>
</tbody>
</table></div>
-<a name="range.mfc_atl.overview"></a><h5>
-<a name="id2818057"></a>
- <a class="link"
href="mfc_atl.html#range.mfc_atl.overview">Overview</a>
+<a name="range.mfc_atl.overview_______"></a><h5>
+<a name="id5030360"></a>
+ <a class="link"
href="mfc_atl.html#range.mfc_atl.overview_______">Overview
概要</a>
</h5>
<p>
Boost.Range MFC/ATL Extension provides Boost.Range support for
MFC/ATL collection
- and string types.
+ and string types.<br> Boost.Range 的 MFC/ATL
扩展提供了对 MFC/ATL
+
集合和字符串类型的
Boost.Range 支持。
</p>
<p>
=======================================
--- /trunk/libs/range/doc/html/range/portability.html Mon May 31 00:54:22
2010
+++ /trunk/libs/range/doc/html/range/portability.html Tue Jun 22 21:13:43
2010
@@ -1,12 +1,12 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Portability</title>
+<title>Portability 可移植性</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../index.html" title="Chapter 1. Range
2.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../index.html" title="Chapter 1. Range
2.0">
<link rel="up" href="../index.html" title="Chapter 1. Range 2.0">
-<link rel="prev" href="upgrade/upgrade_from_1_34.html" title="Upgrade from
version 1.34">
+<link rel="prev" href="upgrade/upgrade_from_1_34.html" title="Upgrade from
version 1.34 从版本1.34升级">
<link rel="next" href="faq.html" title="FAQ">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
@@ -22,54 +22,64 @@
<div class="spirit-nav">
<a accesskey="p" href="upgrade/upgrade_from_1_34.html"><img
src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../index.html"><img
src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h"
href="../index.html"><img src="../../../../../doc/html/images/home.png"
alt="Home"></a><a accesskey="n" href="faq.html"><img
src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Portability">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="range.portability"></a><a class="link" href="portability.html"
title="Portability">Portability</a>
+<a name="range.portability"></a><a class="link" href="portability.html"
title="Portability 可移植性"> Portability
可移植性</a>
</h2></div></div></div>
<p>
- A huge effort has been made to port the library to as many compilers
as possible.
+ A huge effort has been made to port the library to as many compilers
as possible.<br>
+
为了将这个库移植到尽可能多的编译器上,我们作出了巨大的努力。
</p>
<p>
Full support for built-in arrays require that the compiler supports
class template
partial specialization. For non-conforming compilers there might be
a chance
that it works anyway thanks to workarounds in the type traits
library. Visual
C++ 6/7.0 has a limited support for arrays: as long as the arrays
are of built-in
- type it should work.
+ type it should work.<br>
为了全面支持内建数组,要求编译器支持类模板偏特化。对于不符合标准的编译器,也有机会用
+ type traits 库来绕过。 Visual C++
6/7.0
对于数组的支持有限:只要数组是内建类型的,它就可以工作。
</p>
<p>
Notice also that some compilers cannot do function template ordering
properly.
- In that case one must rely of <a class="link"
href="reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions"><code class="computeroutput"><span
class="identifier">range_iterator</span></code></a> and a single function
+ In that case one must rely of <a class="link"
href="reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions 元函数"><code
class="computeroutput"><span
class="identifier">range_iterator</span></code></a> and a single function
definition instead of overloaded versions for const and non-const
arguments.
- So if one cares about old compilers, one should not pass rvalues to
the functions.
+ So if one cares about old compilers, one should not pass rvalues to
the functions.<br>
+
还要注意,有些编译器不能正确执行函数模板的排序。这种情况下,你必须依赖
+ <a class="link"
href="reference/concept_implementation/semantics/metafunctions.html"
title="Metafunctions 元函数"><code
class="computeroutput"><span
class="identifier">range_iterator</span></code></a>,并定义单个函数而不是分别针对
+ const 和 non-const
参数进行重载。所以如果你用的是旧的编译器,就不能传递右值给函数了。
</p>
<p>
- For maximum portability you should follow these guidelines:
+ For maximum portability you should follow these guidelines:<br>
为了最大的可移植性,你应该遵从以下方针:
</p>
-<div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- do not use built-in arrays,
+<div class="orderedlist"><ol type="1">
+<li>
+ do not use built-in arrays,<br>
不要使用内建数组,
</li>
-<li class="listitem">
- do not pass rvalues to <a class="link"
href="reference/concept_implementation/semantics/functions.html"
title="Functions"><code class="computeroutput"><span
class="identifier">begin</span></code></a><code
class="computeroutput"><span class="special">()</span></code>,
- <a class="link"
href="reference/concept_implementation/semantics/functions.html"
title="Functions"><code class="computeroutput"><span
class="identifier">end</span></code></a><code class="computeroutput"><span
class="special">()</span></code>
+<li>
+ do not pass rvalues to <a class="link"
href="reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">begin</span></code></a><code
class="computeroutput"><span class="special">()</span></code>,
+ <a class="link"
href="reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">end</span></code></a><code class="computeroutput"><span
class="special">()</span></code>
and <a class="link" href="reference/utilities/iterator_range.html"
title="Class iterator_range"><code class="computeroutput"><span
class="identifier">iterator_range</span></code></a> Range constructors
- and assignment operators,
+ and assignment operators,<br>
不要传递右值给 <a class="link"
href="reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">begin</span></code></a><code
class="computeroutput"><span class="special">()</span></code>,
+ <a class="link"
href="reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">end</span></code></a><code class="computeroutput"><span
class="special">()</span></code>
+ 和 <a class="link"
href="reference/utilities/iterator_range.html" title="Class
iterator_range"><code class="computeroutput"><span
class="identifier">iterator_range</span></code></a>
区间构造函数和赋值操作符,
</li>
-<li class="listitem">
- use <a class="link"
href="reference/concept_implementation/semantics/functions.html"
title="Functions"><code class="computeroutput"><span
class="identifier">const_begin</span></code></a><code
class="computeroutput"><span class="special">()</span></code>
- and <a class="link"
href="reference/concept_implementation/semantics/functions.html"
title="Functions"><code class="computeroutput"><span
class="identifier">const_end</span></code></a><code
class="computeroutput"><span class="special">()</span></code>
+<li>
+ use <a class="link"
href="reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">const_begin</span></code></a><code
class="computeroutput"><span class="special">()</span></code>
+ and <a class="link"
href="reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">const_end</span></code></a><code
class="computeroutput"><span class="special">()</span></code>
whenever your code by intention is read-only; this will also solve
most rvalue
- problems,
+ problems,<br> 使用 <a class="link"
href="reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">const_begin</span></code></a><code
class="computeroutput"><span class="special">()</span></code>
+ 和 <a class="link"
href="reference/concept_implementation/semantics/functions.html"
title="Functions 函数"><code class="computeroutput"><span
class="identifier">const_end</span></code></a><code
class="computeroutput"><span class="special">()</span></code>
+
只要你的代码意图是只读的;这可以解决大多数的右值问题,
</li>
-<li class="listitem">
- do not rely on ADL:
- <div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
+<li>
+ do not rely on ADL:<br> 不要依赖于
ADL:
+ <div class="itemizedlist"><ul type="disc">
+<li>
if you overload functions, include that header before the
headers in
- this library,
+ this library,<br>
如果你重载了函数,就要在本库的头文件之前包含你的头文件,
</li>
-<li class="listitem">
- put all overloads in namespace boost.
+<li>
+ put all overloads in namespace boost. <br>
将所有重载放入名字空间
+ boost.
</li>
</ul></div>
</li>
=======================================
---
/trunk/libs/range/doc/html/range/reference/adaptors/general_requirements.html
Mon May 31 00:54:22 2010
+++
/trunk/libs/range/doc/html/range/reference/adaptors/general_requirements.html
Tue Jun 22 21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>General Requirements</title>
+<title>General Requirements 基本要求</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../../index.html"
title="Chapter 1. Range 2.0">
-<link rel="up" href="../adaptors.html" title="Range Adaptors">
-<link rel="prev" href="introduction.html" title="Introduction and
motivation">
-<link rel="next" href="reference.html" title="Reference">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../adaptors.html" title="Range Adaptors
区间适配器">
+<link rel="prev" href="introduction.html" title="Introduction and
motivation 介绍与动机">
+<link rel="next" href="reference.html" title="Reference
参考手册">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,72 +22,86 @@
<div class="spirit-nav">
<a accesskey="p" href="introduction.html"><img
src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../adaptors.html"><img
src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../index.html"><img
src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="reference.html"><img
src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="General Requirements">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="range.reference.adaptors.general_requirements"></a><a
class="link" href="general_requirements.html" title="General Requirements">
General
- Requirements</a>
+<a name="range.reference.adaptors.general_requirements"></a><a
class="link" href="general_requirements.html" title="General Requirements
基本要求"> General
+ Requirements 基本要求</a>
</h4></div></div></div>
<p>
In the description of generator expressions, the following
notation is
- used:
+ used:<br>
在描述生成器表达式时,使用以下记号:
</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
<code class="computeroutput"><span class="identifier">fwdRng</span></code>
is an expression
of a type <code class="computeroutput"><span
class="identifier">R</span></code> that models
- <code class="computeroutput"><span
class="identifier">ForwardRange</span></code>
+ <code class="computeroutput"><span
class="identifier">ForwardRange</span></code><br><code
class="computeroutput"><span class="identifier">fwdRng</span></code>
是一个类型为 <code
class="computeroutput"><span class="identifier">R</span></code>
的表达式,符合 <code
class="computeroutput"><span class="identifier">ForwardRange</span></code>
</li>
-<li class="listitem">
+<li>
<code class="computeroutput"><span class="identifier">biRng</span></code>
is an expression
of a type <code class="computeroutput"><span
class="identifier">R</span></code> that models
+ <code class="computeroutput"><span
class="identifier">BidirectionalRange</span></code><br><code
class="computeroutput"><span class="identifier">biRng</span></code>
是一个类型为
+ <code class="computeroutput"><span
class="identifier">R</span></code>
的表达式,符合
<code class="computeroutput"><span
class="identifier">BidirectionalRange</span></code>
</li>
-<li class="listitem">
+<li>
<code class="computeroutput"><span class="identifier">rndRng</span></code>
is an expression
of a type <code class="computeroutput"><span
class="identifier">R</span></code> that models
+ <code class="computeroutput"><span
class="identifier">RandomAccessRange</span></code><br><code
class="computeroutput"><span class="identifier">rndRng</span></code>
是一个类型为
+ <code class="computeroutput"><span
class="identifier">R</span></code>
的表达式,符合
<code class="computeroutput"><span
class="identifier">RandomAccessRange</span></code>
</li>
-<li class="listitem">
+<li>
<code class="computeroutput"><span class="identifier">pred</span></code>
is an expression
- of a type that models <code class="computeroutput"><span
class="identifier">UnaryPredicate</span></code>
-</li>
-<li class="listitem">
+ of a type that models <code class="computeroutput"><span
class="identifier">UnaryPredicate</span></code><br><code
class="computeroutput"><span class="identifier">pred</span></code>
是一个符合
+ <code class="computeroutput"><span
class="identifier">UnaryPredicate</span></code>
的类型的表达式
+ </li>
+<li>
<code class="computeroutput"><span
class="identifier">bi_pred</span></code> is an expression
- of a type that models <code class="computeroutput"><span
class="identifier">BinaryPredicate</span></code>
-</li>
-<li class="listitem">
+ of a type that models <code class="computeroutput"><span
class="identifier">BinaryPredicate</span></code><br><code
class="computeroutput"><span class="identifier">bi_pred</span></code>
是一个符合
+ <code class="computeroutput"><span
class="identifier">BinaryPredicate</span></code>
的类型的表达式
+ </li>
+<li>
<code class="computeroutput"><span class="identifier">fun</span></code> is
an expression
- of a type that models <code class="computeroutput"><span
class="identifier">UnaryFunction</span></code>
-</li>
-<li class="listitem">
+ of a type that models <code class="computeroutput"><span
class="identifier">UnaryFunction</span></code><br><code
class="computeroutput"><span class="identifier">fun</span></code>
是一个 <code class="computeroutput"><span
class="identifier">UnaryFunction</span></code>
的类型的表达式
+ </li>
+<li>
<code class="computeroutput"><span class="identifier">value</span></code>,
<code class="computeroutput"><span
class="identifier">new_value</span></code> and <code
class="computeroutput"><span class="identifier">old_value</span></code>
- are objects convertible to <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">range_value</span><span class="special"><</span><span
class="identifier">R</span><span class="special">>::</span><span
class="identifier">type</span></code>
-</li>
-<li class="listitem">
+ are objects convertible to <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">range_value</span><span class="special"><</span><span
class="identifier">R</span><span class="special">>::</span><span
class="identifier">type</span></code><br><code class="computeroutput"><span
class="identifier">value</span></code>, <code class="computeroutput"><span
class="identifier">new_value</span></code> 和 <code
class="computeroutput"><span class="identifier">old_value</span></code>
+ 均为可转换为 <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">range_value</span><span
class="special"><</span><span class="identifier">R</span><span
class="special">>::</span><span class="identifier">type</span></code>
+ 的对象
+ </li>
+<li>
<code class="computeroutput"><span class="identifier">n</span><span
class="special">,</span><span class="identifier">m</span></code> are
integer expressions convertible
- to <code class="computeroutput"><span
class="identifier">range_difference</span><span
class="special"><</span><span class="identifier">R</span><span
class="special">>::</span><span class="identifier">type</span></code>
-</li>
+ to <code class="computeroutput"><span
class="identifier">range_difference</span><span
class="special"><</span><span class="identifier">R</span><span
class="special">>::</span><span
class="identifier">type</span></code><br><code class="computeroutput"><span
class="identifier">n</span><span class="special">,</span><span
class="identifier">m</span></code>
+ 为可转换为 <code
class="computeroutput"><span
class="identifier">range_difference</span><span
class="special"><</span><span class="identifier">R</span><span
class="special">>::</span><span class="identifier">type</span></code>
+ 整数表达式
+ </li>
</ul></div>
<p>
Also note that <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">range_value</span><span class="special"><</span><span
class="identifier">R</span><span class="special">>::</span><span
class="identifier">type</span></code> must be implicitly convertible to
the type arguments to <code class="computeroutput"><span
class="identifier">pred</span></code>,
- <code class="computeroutput"><span
class="identifier">bi_pred</span></code> and <code
class="computeroutput"><span class="identifier">fun</span></code>.
+ <code class="computeroutput"><span
class="identifier">bi_pred</span></code> and <code
class="computeroutput"><span class="identifier">fun</span></code>.<br>
还要注意,<code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">range_value</span><span class="special"><</span><span
class="identifier">R</span><span class="special">>::</span><span
class="identifier">type</span></code>
必须可隐式转换为 <code
class="computeroutput"><span class="identifier">pred</span></code>, <code
class="computeroutput"><span class="identifier">bi_pred</span></code>
+ 和 <code class="computeroutput"><span
class="identifier">fun</span></code>
的类型参数。
</p>
<p>
Range Category in the following adaptor descriptions refers to
the minimum
range concept required by the range passed to the adaptor. The
resultant
range is a model of the same range concept as the input range
unless specified
- otherwise.
+ otherwise.<br>
以下适配器说明中的区间类别为传递给该适配器的区间所要求的最小区间概念。结果区间则为输入区间的相同区间概念,除非有特别说明。
</p>
<p>
Returned Range Category is the concept of the returned range. In
some cases
the returned range is of a lesser category than the range passed
to the
adaptor. For example, the <code class="computeroutput"><span
class="identifier">filtered</span></code>
adaptor returns only a <code class="computeroutput"><span
class="identifier">ForwardRange</span></code>
- regardless of the input.
+ regardless of the input.<br>
返回的区间类别是所返回区间的概念。在某些情况下,所返回的区间与传入至适配器的区间相比是低一些的类别。
+ 例如,<code class="computeroutput"><span
class="identifier">filtered</span></code>
适配器只能根据输入返回相对应的
+ <code class="computeroutput"><span
class="identifier">ForwardRange</span></code>。
</p>
<p>
- Furthermore, the following rules apply to any expression of the
form
+ Furthermore, the following rules apply to any expression of the
form<br>
+
另外,以下规则被应用于这种形式的表达式
</p>
<pre class="programlisting"><span class="identifier">rng</span> <span
class="special">|</span> <span class="identifier">boost</span><span
class="special">::</span><span class="identifier">adaptors</span><span
class="special">::</span><span class="identifier">adaptor_generator</span>
</pre>
@@ -98,31 +112,43 @@
to a range <code class="computeroutput"><span
class="identifier">R</span></code> (always left
argument) and a range adapter <code class="computeroutput"><span
class="identifier">RA</span></code>
(always right argument) yields a new range type which may not
conform to
- the same range concept as <code class="computeroutput"><span
class="identifier">R</span></code>.
+ the same range concept as <code class="computeroutput"><span
class="identifier">R</span></code>.<br>
+ 1. 将 <code class="computeroutput"><span
class="keyword">operator</span><span class="special">|()</span></code>
+ 应用于区间 <code
class="computeroutput"><span class="identifier">R</span></code>
(只能是左参数)
+ 和区间适配器 <code
class="computeroutput"><span class="identifier">RA</span></code>
(只能是右参数),将生成一个新的区间类型,可能不符合
+ <code class="computeroutput"><span
class="identifier">R</span></code>
的区间概念。
</p>
<p>
- 2. The return-type of <code class="computeroutput"><span
class="keyword">operator</span><span class="special">|()</span></code> is
otherwise unspecified.
+ 2. The return-type of <code class="computeroutput"><span
class="keyword">operator</span><span class="special">|()</span></code> is
otherwise unspecified.<br> 2.
+ <code class="computeroutput"><span
class="keyword">operator</span><span class="special">|()</span></code>
+
的返回类型是不确定的。
</p>
<p>
3. <code class="computeroutput"><span
class="keyword">operator</span><span class="special">|()</span></code>
is found by Argument Dependent Lookup (ADL) because a range
adaptor is
- implemented in namespace <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">adaptors</span></code>.
+ implemented in namespace <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">adaptors</span></code>.<br>
+ 3. <code class="computeroutput"><span
class="keyword">operator</span><span class="special">|()</span></code>
+
是用ADL来查找的,因为区间适配器的实现位于名字空间
+ <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">adaptors</span></code> 中。
</p>
<p>
4. <code class="computeroutput"><span
class="keyword">operator</span><span class="special">|()</span></code>
is used to add new behaviour <span class="emphasis"><em><span
class="bold"><strong>lazily</strong></span></em></span>
- and never modifies its left argument.
+ and never modifies its left argument.<br> 4. <code
class="computeroutput"><span class="keyword">operator</span><span
class="special">|()</span></code> 用于<span
class="emphasis"><em>*延迟地*</em></span>增加新的行为,不会修改它的左参数。
</p>
<p>
5. All iterators extracted from the left argument are extracted
using qualified
calls to <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">begin</span><span class="special">()</span></code>
- and <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">end</span><span class="special">()</span></code>.
+ and <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">end</span><span class="special">()</span></code>.<br>
+ 5.
从左参数取得的迭代器是通过对
<code class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">begin</span><span
class="special">()</span></code> 和 <code
class="computeroutput"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">end</span><span
class="special">()</span></code>
的限定调用获得的。
</p>
<p>
6. In addition to the <code class="computeroutput"><span
class="keyword">throw</span></code>-clauses
below, <code class="computeroutput"><span
class="keyword">operator</span><span class="special">|()</span></code>
may throw exceptions as a result of copying iterators. If such
copying
- cannot throw an exception, then neither can the whole expression.
+ cannot throw an exception, then neither can the whole
expression.<br>
+ 6. 除了 <code class="computeroutput"><span
class="keyword">throw</span></code>-子句以外,<code
class="computeroutput"><span class="keyword">operator</span><span
class="special">|()</span></code>
+
还可能抛出异常作为迭代器复制的结果。如果此类复制不会抛出异常,则整个表达式也不会。
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
width="100%"><tr>
=======================================
--- /trunk/libs/range/doc/html/range/reference/adaptors/introduction.html
Mon May 31 00:54:22 2010
+++ /trunk/libs/range/doc/html/range/reference/adaptors/introduction.html
Tue Jun 22 21:13:43 2010
@@ -1,13 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Introduction and motivation</title>
+<title>Introduction and motivation
介绍与动机</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css"
type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../../index.html"
title="Chapter 1. Range 2.0">
-<link rel="up" href="../adaptors.html" title="Range Adaptors">
-<link rel="prev" href="../adaptors.html" title="Range Adaptors">
-<link rel="next" href="general_requirements.html" title="General
Requirements">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../adaptors.html" title="Range Adaptors
区间适配器">
+<link rel="prev" href="../adaptors.html" title="Range Adaptors
区间适配器">
+<link rel="next" href="general_requirements.html" title="General
Requirements 基本要求">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,17 +22,19 @@
<div class="spirit-nav">
<a accesskey="p" href="../adaptors.html"><img
src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../adaptors.html"><img
src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../index.html"><img
src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="general_requirements.html"><img
src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Introduction and motivation">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="range.reference.adaptors.introduction"></a><a class="link"
href="introduction.html" title="Introduction and motivation"> Introduction
- and motivation</a>
+<a name="range.reference.adaptors.introduction"></a><a class="link"
href="introduction.html" title="Introduction and motivation
介绍与动机"> Introduction
+ and motivation 介绍与动机</a>
</h4></div></div></div>
<p>
A <span class="bold"><strong>Range Adaptor</strong></span> is a
class that wraps
an existing Range to provide a new Range with different
behaviour. Since
the behaviour of Ranges is determined by their associated
iterators, a
Range Adaptor simply wraps the underlying iterators with new
special iterators.
- In this example
+ In this example<br> <span
class="bold"><strong>区间适配器</strong></span>
+
是一个类,它对某个已有区间进行包装并提供具有不同行为的另一个新区间。
+
由于区间的行为是由它们的关联迭代器所决定的,所以区间适配器只是以新的特定迭代器对底层的迭代器进行包装。在以下例子中
</p>
<p>
@@ -52,7 +54,9 @@
the iterators from <code class="computeroutput"><span
class="identifier">vec</span></code>
are wrapped <code class="computeroutput"><span
class="identifier">reverse_iterator</span></code>s.
The type of the underlying Range Adapter is not documented
because you
- do not need to know it. All that is relevant is that the
expression
+ do not need to know it. All that is relevant is that the
expression<br>
+ 来自 <code class="computeroutput"><span
class="identifier">vec</span></code>
的迭代器被包装为
+ <code class="computeroutput"><span
class="identifier">reverse_iterator</span></code>。底层的区间适配器并没有出现,因为你不需要知道它。所有相关的只是表达式
</p>
<p>
@@ -66,7 +70,9 @@
of the range <code class="computeroutput"><span
class="identifier">vec</span></code> wrapped
in <code class="computeroutput"><span
class="identifier">reverse_iterator</span></code>. The
expression <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">adaptors</span><span class="special">::</span><span
class="identifier">reversed</span></code> is called an <span
class="bold"><strong>Adaptor
- Generator</strong></span>.
+ Generator</strong></span>.<br>
它返回一个区间适配器,其中迭代器类型变为区间
+ <code class="computeroutput"><span
class="identifier">vec</span></code> 被包装为 <code
class="computeroutput"><span
class="identifier">reverse_iterator</span></code>
的迭代器类型。
+ 表达式 <code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">adaptors</span><span class="special">::</span><span
class="identifier">reversed</span></code> 被称为
*适配器生成器*。
</p>
<p>
There are two ways of constructing a range adaptor. The first is
by using
@@ -76,10 +82,15 @@
a more familiar function syntax, so equivalent functions of the
present
tense form have been added as an alternative syntax. The
equivalent to
<code class="computeroutput"><span class="identifier">rng</span>
<span class="special">|</span>
- <span class="identifier">reversed</span></code> is <code
class="computeroutput"><span class="identifier">adaptors</span><span
class="special">::</span><span class="identifier">reverse</span><span
class="special">(</span><span class="identifier">rng</span><span
class="special">)</span></code> for example.
+ <span class="identifier">reversed</span></code> is <code
class="computeroutput"><span class="identifier">adaptors</span><span
class="special">::</span><span class="identifier">reverse</span><span
class="special">(</span><span class="identifier">rng</span><span
class="special">)</span></code> for example.<br>
有两种方法构造一个区间适配器。第一种方法是用
+ <code class="computeroutput"><span
class="keyword">operator</span><span class="special">|
()</span></code>。这是我比较喜欢的方法,不过在与其他人讨论区间适配器时,
+
有些用户非常希望使用一种更常见的函数语法,所以增加了一种等效的函数形式作为另一种语法。例如,与
+ <code class="computeroutput"><span class="identifier">rng</span>
<span class="special">|</span>
+ <span class="identifier">reversed</span></code>
相等价的是 <code class="computeroutput"><span
class="identifier">adaptors</span><span class="special">::</span><span
class="identifier">reverse</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">)</span></code>。
</p>
<p>
- Why do I prefer the <code class="computeroutput"><span
class="keyword">operator</span><span class="special">|</span></code>
syntax? The answer is readability:
+ Why do I prefer the <code class="computeroutput"><span
class="keyword">operator</span><span class="special">|</span></code>
syntax? The answer is readability:<br>
+ 我为什么喜欢 <code
class="computeroutput"><span class="keyword">operator</span><span
class="special">|</span></code>
语法呢?答案是可读性:
</p>
<p>
@@ -92,7 +103,7 @@
</p>
<p>
This might not look so bad, but when we apply several adaptors,
it becomes
- much worse. Just compare
+ much worse. Just compare<br>
这个看起来还不错,但如果我们要同时应用多个适配器,就会变得糟糕了。比较一下
</p>
<p>
@@ -119,34 +130,41 @@
<p>
Furthermore, some of the adaptor generators take arguments
themselves and
these arguments are expressed with function call notation too.
In those
- situations, you will really appreciate the succinctness of <code
class="computeroutput"><span class="keyword">operator</span><span
class="special">|()</span></code>.
+ situations, you will really appreciate the succinctness of <code
class="computeroutput"><span class="keyword">operator</span><span
class="special">|()</span></code>.<br>
+
此外,有些适配器生成器本身带有参数,这些参数也是以函数调用的形式出现的。在这种情形下,你就会喜欢
+ <code class="computeroutput"><span
class="keyword">operator</span><span class="special">|()</span></code>
+ 的简洁了。
</p>
-<a
name="range.reference.adaptors.introduction.composition_of_adaptors"></a><h6>
-<a name="id2701931"></a>
- <a class="link"
href="introduction.html#range.reference.adaptors.introduction.composition_of_adaptors">Composition
- of Adaptors</a>
+<a
name="range.reference.adaptors.introduction.composition_of_adaptors________________"></a><h6>
+<a name="id4872492"></a>
+ <a class="link"
href="introduction.html#range.reference.adaptors.introduction.composition_of_adaptors________________">Composition
+ of Adaptors 适配器组合</a>
</h6>
<p>
Range Adaptors are a powerful complement to Range algorithms.
The reason
is that adaptors are <span class="emphasis"><em><span
class="bold"><strong>orthogonal</strong></span></em></span>
- to algorithms. For example, consider these Range algorithms:
+ to algorithms. For example, consider these Range algorithms:<br>
区间适配器是对区间算法的强大补充。其原因是,适配器与算法是
+ <span class="bold"><strong>'正交*</strong></span>
的。例如,考虑以下区间算法:
</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem"><code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">copy</span><span class="special">(</span> <span
class="identifier">rng</span><span class="special">,</span> <span
class="identifier">out</span> <span class="special">)</span></code></li>
-<li class="listitem"><code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">count</span><span class="special">(</span> <span
class="identifier">rng</span><span class="special">,</span> <span
class="identifier">pred</span> <span class="special">)</span></code></li>
+<div class="itemizedlist"><ul type="disc">
+<li><code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">copy</span><span class="special">(</span> <span
class="identifier">rng</span><span class="special">,</span> <span
class="identifier">out</span> <span class="special">)</span></code></li>
+<li><code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">count</span><span class="special">(</span> <span
class="identifier">rng</span><span class="special">,</span> <span
class="identifier">pred</span> <span class="special">)</span></code></li>
</ul></div>
<p>
What should we do if we only want to copy an element <code
class="computeroutput"><span class="identifier">a</span></code>
if it satisfies some predicate, say <code
class="computeroutput"><span class="identifier">pred</span><span
class="special">(</span><span class="identifier">a</span><span
class="special">)</span></code>?
And what if we only want to count the elements that satisfy the
same predicate?
- The naive answer would be to use these algorithms:
+ The naive answer would be to use these algorithms:<br>
如果我们只想拷贝满足某种条件,如
+ <code class="computeroutput"><span
class="identifier">pred</span><span class="special">(</span><span
class="identifier">a</span><span
class="special">)</span></code>,的一个元素
+ <code class="computeroutput"><span
class="identifier">a</span></code>,该怎么办?还有,如果我们只想对满足某种条件的元素进行计数,又该如何?
+
幼稚的答案是使用以下算法:
</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem"><code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">copy_if</span><span class="special">(</span>
+<div class="itemizedlist"><ul type="disc">
+<li><code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">copy_if</span><span class="special">(</span>
<span class="identifier">rng</span><span
class="special">,</span>
<span class="identifier">pred</span><span
class="special">,</span>
<span class="identifier">out</span> <span
class="special">)</span></code></li>
-<li class="listitem"><code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">count_if</span><span class="special">(</span>
+<li><code class="computeroutput"><span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">count_if</span><span class="special">(</span>
<span class="identifier">rng</span><span
class="special">,</span>
<span class="identifier">pred</span> <span
class="special">)</span></code></li>
</ul></div>
@@ -156,12 +174,13 @@
suffers a combinatorial explosion. Inevitably many algorithms
are missing
<code class="computeroutput"><span
class="identifier">_if</span></code> variants and there
is redundant development overhead for each new algorithm. The
Adaptor Generator
- is the design solution to this problem.
+ is the design solution to this problem.<br>
这些算法只是针对标准库的算法进行一对一的定义。这种增加算法的方法会导致组合爆炸。不可避免地,很多算法没有
+ <code class="computeroutput"><span
class="identifier">_if</span></code>
的变体,而且对于每一个新算法都需要重复的开发。区间适配器就是设计用于解决这个问题的。
</p>
-<a
name="range.reference.adaptors.introduction.range_adaptor_alternative_to_copy_if_algorithm"></a><h6>
-<a name="id2702239"></a>
- <a class="link"
href="introduction.html#range.reference.adaptors.introduction.range_adaptor_alternative_to_copy_if_algorithm">Range
- Adaptor alternative to copy_if algorithm</a>
+<a
name="range.reference.adaptors.introduction.range_adaptor_alternative_to_copy_if_algorithm______________________copy_if______"></a><h6>
+<a name="id4872878"></a>
+ <a class="link"
href="introduction.html#range.reference.adaptors.introduction.range_adaptor_alternative_to_copy_if_algorithm______________________copy_if______">Range
+ Adaptor alternative to copy_if algorithm
区间适配器替代copy_if算法</a>
</h6>
<p>
@@ -169,16 +188,16 @@
<pre class="programlisting"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">copy_if</span><span
class="special">(</span> <span class="identifier">rng</span><span
class="special">,</span> <span class="identifier">pred</span><span
class="special">,</span> <span class="identifier">out</span> <span
class="special">);</span>
</pre>
<p>
- can be expressed as
+ can be expressed as<br> 可以写为
</p>
<pre class="programlisting"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">copy</span><span
class="special">(</span> <span class="identifier">rng</span> <span
class="special">|</span> <span class="identifier">boost</span><span
class="special">::</span><span class="identifier">adaptors</span><span
class="special">::</span><span class="identifier">filtered</span><span
class="special">(</span><span class="identifier">pred</span><span
class="special">),</span> <span class="identifier">out</span> <span
class="special">);</span>
</pre>
<p>
</p>
-<a
name="range.reference.adaptors.introduction.range_adaptor_alternative_to_count_if_algorithm"></a><h6>
-<a name="id2702408"></a>
- <a class="link"
href="introduction.html#range.reference.adaptors.introduction.range_adaptor_alternative_to_count_if_algorithm">Range
- Adaptor alternative to count_if algorithm</a>
+<a
name="range.reference.adaptors.introduction.range_adaptor_alternative_to_count_if_algorithm______________________count_if______"></a><h6>
+<a name="id4873055"></a>
+ <a class="link"
href="introduction.html#range.reference.adaptors.introduction.range_adaptor_alternative_to_count_if_algorithm______________________count_if______">Range
+ Adaptor alternative to count_if algorithm
区间适配器替代count_if算法</a>
</h6>
<p>
@@ -186,7 +205,7 @@
<pre class="programlisting"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">count_if</span><span
class="special">(</span> <span class="identifier">rng</span><span
class="special">,</span> <span class="identifier">pred</span> <span
class="special">);</span>
</pre>
<p>
- can be expressed as
+ can be expressed as<br> 可以写为
</p>
<pre class="programlisting"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">count</span><span
class="special">(</span> <span class="identifier">rng</span> <span
class="special">|</span> <span class="identifier">boost</span><span
class="special">::</span><span class="identifier">adaptors</span><span
class="special">::</span><span class="identifier">filtered</span><span
class="special">(</span><span class="identifier">pred</span><span
class="special">),</span> <span class="identifier">out</span> <span
class="special">);</span>
</pre>
@@ -196,7 +215,10 @@
What this means is that <span class="emphasis"><em><span
class="bold"><strong>no</strong></span></em></span>
algorithm with the <code class="computeroutput"><span
class="identifier">_if</span></code>
suffix is needed. Furthermore, it turns out that algorithms with
the <code class="computeroutput"><span
class="identifier">_copy</span></code> suffix are not needed either.
Consider
- the somewhat misdesigned <code class="computeroutput"><span
class="identifier">replace_copy_if</span><span
class="special">()</span></code> which may be used as
+ the somewhat misdesigned <code class="computeroutput"><span
class="identifier">replace_copy_if</span><span
class="special">()</span></code> which may be used as<br>
这意味着带
+ <code class="computeroutput"><span
class="identifier">_if</span></code>
后缀的算法<span
class="emphasis"><em>*不*</em></span>再需要了。此外,它可以令带
+ <code class="computeroutput"><span
class="identifier">_copy</span></code>
后缀的算法也不再需要了。
+
考虑某个设计得并不好的
<code class="computeroutput"><span
class="identifier">replace_copy_if</span><span
class="special">()</span></code>
算法,可能的用法如下
</p>
<p>
@@ -207,7 +229,7 @@
<p>
</p>
<p>
- With adaptors and algorithms we can express this as
+ With adaptors and algorithms we can express this as<br>
有了适配器和算法,我们可以这样写
</p>
<p>
@@ -218,15 +240,18 @@
<p>
</p>
<p>
- The latter code has several benefits:
+ The latter code has several benefits:<br>
后一段代码有几个好处:
</p>
<p>
1. it is more <span class="emphasis"><em><span
class="bold"><strong>efficient</strong></span></em></span>
- because we avoid extra allocations as might happen with <code
class="computeroutput"><span class="identifier">std</span><span
class="special">::</span><span
class="identifier">back_inserter</span></code>
+ because we avoid extra allocations as might happen with <code
class="computeroutput"><span class="identifier">std</span><span
class="special">::</span><span
class="identifier">back_inserter</span></code><br>
+ 1. 它更为<span
class="emphasis"><em>*高效*</em></span>,因为我们避免了使用
+ <code class="computeroutput"><span
class="identifier">std</span><span class="special">::</span><span
class="identifier">back_inserter</span></code>
可能会发生的额外内存分配。
</p>
<p>
2. it is <span class="emphasis"><em><span
class="bold"><strong>flexible</strong></span></em></span>
- as we can subsequently apply even more adaptors, for example:
+ as we can subsequently apply even more adaptors, for example:
<br> 2.
+ 它更为<span
class="emphasis"><em>*灵活*</em></span>,因为我们可以继续应用更多的适配器,例如
</p>
<pre class="programlisting"><span class="identifier">boost</span><span
class="special">::</span><span class="identifier">push_back</span><span
class="special">(</span><span class="identifier">vec</span><span
class="special">,</span> <span class="identifier">rng</span> <span
class="special">|</span> <span class="identifier">boost</span><span
class="special">::</span><span class="identifier">adaptors</span><span
class="special">::</span><span class="identifier">replaced_if</span><span
class="special">(</span><span class="identifier">pred</span><span
class="special">,</span> <span class="identifier">new_value</span><span
class="special">)</span>
<span class="special">|</span> <span
class="identifier">boost</span><span class="special">::</span><span
class="identifier">adaptors</span><span class="special">::</span><span
class="identifier">reversed</span><span class="special">);</span>
@@ -235,27 +260,31 @@
</p>
<p>
3. it is <span class="emphasis"><em><span
class="bold"><strong>safer</strong></span></em></span> because
- there is no use of an unbounded output iterator.
+ there is no use of an unbounded output iterator.<br> 3.
它<span
class="emphasis"><em>*更为安全*</em></span>,因为无需使用未绑定的输出迭代器。
</p>
<p>
In this manner, the <span class="emphasis"><em><span
class="bold"><strong>composition</strong></span></em></span>
- of Range Adaptors has the following consequences:
+ of Range Adaptors has the following consequences:<br>
在这种方式下,区间适配器的<span
class="emphasis"><em>*组合*</em></span>具有以下作用:
</p>
<p>
1. we no longer need <code class="computeroutput"><span
class="identifier">_if</span></code>,
<code class="computeroutput"><span
class="identifier">_copy</span></code>, <code class="computeroutput"><span
class="identifier">_copy_if</span></code>
- and <code class="computeroutput"><span
class="identifier">_n</span></code> variants of algorithms.
+ and <code class="computeroutput"><span
class="identifier">_n</span></code> variants of algorithms.<br>
+ 1.
我们不再需要算法的
<code class="computeroutput"><span class="identifier">_if</span></code>,
+ <code class="computeroutput"><span
class="identifier">_copy</span></code>, <code class="computeroutput"><span
class="identifier">_copy_if</span></code>
+ 和 <code class="computeroutput"><span
class="identifier">_n</span></code> 各种变体。
</p>
<p>
2. we can generate a multitude of new algorithms on the fly, for
example,
- above we generated <code class="computeroutput"><span
class="identifier">reverse_replace_copy_if</span><span
class="special">()</span></code>
+ above we generated <code class="computeroutput"><span
class="identifier">reverse_replace_copy_if</span><span
class="special">()</span></code><br> 2.
我们可以就地生成多个新算法,例如前面我们就生成了
+ <code class="computeroutput"><span
class="identifier">reverse_replace_copy_if</span><span
class="special">()</span></code>
</p>
<p>
- In other words:
+ In other words:<br> 换言之:
</p>
<p>
<span class="bold"><strong>Range Adaptors are to algorithms what
algorithms
- are to containers</strong></span>
+ are to containers</strong></span><br> <span
class="bold"><strong>区间适配器对于算法的意义正如算法对于容器的意义</strong></span>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
width="100%"><tr>
=======================================
---
/trunk/libs/range/doc/html/range/reference/adaptors/reference/adjacent_filtered.html
Mon May 31 00:54:22 2010
+++
/trunk/libs/range/doc/html/range/reference/adaptors/reference/adjacent_filtered.html
Tue Jun 22 21:13:43 2010
@@ -3,10 +3,10 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>adjacent_filtered</title>
<link rel="stylesheet"
href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../../../index.html"
title="Chapter 1. Range 2.0">
-<link rel="up" href="../reference.html" title="Reference">
-<link rel="prev" href="../reference.html" title="Reference">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../reference.html" title="Reference
参考手册">
+<link rel="prev" href="../reference.html" title="Reference
参考手册">
<link rel="next" href="copied.html" title="copied">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
@@ -22,13 +22,13 @@
<div class="spirit-nav">
<a accesskey="p" href="../reference.html"><img
src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../reference.html"><img
src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../../index.html"><img
src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="copied.html"><img
src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="adjacent_filtered">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="range.reference.adaptors.reference.adjacent_filtered"></a><a
class="link" href="adjacent_filtered.html" title="adjacent_filtered">
adjacent_filtered</a>
</h5></div></div></div>
<div class="toc"><dl><dt><span class="section"><a
href="adjacent_filtered.html#range.reference.adaptors.reference.adjacent_filtered.adjacent_filtered_example">
- adjacent_filtered example</a></span></dt></dl></div>
+ adjacent_filtered example
示例</a></span></dt></dl></div>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -37,12 +37,12 @@
<thead><tr>
<th>
<p>
- Syntax
+ Syntax 语法
</p>
</th>
<th>
<p>
- Code
+ Code 代码
</p>
</th>
</tr></thead>
@@ -50,7 +50,7 @@
<tr>
<td>
<p>
- Pipe
+ Pipe 通道式
</p>
</td>
<td>
@@ -63,7 +63,7 @@
<tr>
<td>
<p>
- Function
+ Function 函数式
</p>
</td>
<td>
@@ -75,34 +75,40 @@
</tr>
</tbody>
</table></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
<span class="bold"><strong>Precondition:</strong></span> The <code
class="computeroutput"><span class="identifier">value_type</span></code>
- of the range is convertible to both argument types of <code
class="computeroutput"><span class="identifier">bi_pred</span></code>.
+ of the range is convertible to both argument types of <code
class="computeroutput"><span
class="identifier">bi_pred</span></code>.<br><span
class="bold"><strong>前提条件:</strong></span>
+ 区间的 <code class="computeroutput"><span
class="identifier">value_type</span></code>
+ 可转换为 <code
class="computeroutput"><span class="identifier">bi_pred</span></code>
+
的两个参数类型。
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Postcondition:</strong></span> For all adjacent
elements
<code class="computeroutput"><span
class="special">[</span><span class="identifier">x</span><span
class="special">,</span><span class="identifier">y</span><span
class="special">]</span></code> in the returned range, <code
class="computeroutput"><span class="identifier">bi_pred</span><span
class="special">(</span><span class="identifier">x</span><span
class="special">,</span><span class="identifier">y</span><span
class="special">)</span></code>
- is <code class="computeroutput"><span
class="keyword">true</span></code>.
+ is <code class="computeroutput"><span
class="keyword">true</span></code>.<br><span
class="bold"><strong>后验条件:</strong></span>
对于F返回区间中的所有相邻元素
+ <code class="computeroutput"><span
class="special">[</span><span class="identifier">x</span><span
class="special">,</span><span class="identifier">y</span><span
class="special">]</span></code>,<code class="computeroutput"><span
class="identifier">bi_pred</span><span class="special">(</span><span
class="identifier">x</span><span class="special">,</span><span
class="identifier">y</span><span class="special">)</span></code> 为
<code class="computeroutput"><span class="keyword">true</span></code>.
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Throws:</strong></span> Whatever the copy
constructor
- of <code class="computeroutput"><span
class="identifier">bi_pred</span></code> might throw.
+ of <code class="computeroutput"><span
class="identifier">bi_pred</span></code> might throw.<br><span
class="bold"><strong>抛出:</strong></span><code
class="computeroutput"><span class="identifier">bi_pred</span></code>
+
的复制构造函数可能抛出的任何异常。
</li>
-<li class="listitem">
-<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/single_pass_range.html" title="Single Pass
Range">Single
- Pass Range</a>
+<li>
+<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/single_pass_range.html" title="Single Pass Range
单遍区间">Single
+ Pass Range</a><br><span
class="bold"><strong>区间类别:</strong></span><a
class="link" href="../../../concepts/single_pass_range.html" title="Single
Pass Range 单遍区间">Single Pass Range</a>
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Returned Range Category:</strong></span> The
minimum
of the range category of <code class="computeroutput"><span
class="identifier">rng</span></code>
- and <a class="link"
href="../../../concepts/forward_range.html" title="Forward Range">Forward
Range</a>
-</li>
+ and <a class="link"
href="../../../concepts/forward_range.html" title="Forward Range
前向区间">Forward Range</a><br><span
class="bold"><strong>返回区间类别:</strong></span><code
class="computeroutput"><span class="identifier">rng</span></code> 和
<a class="link" href="../../../concepts/forward_range.html" title="Forward
Range 前向区间">Forward
+ Range</a>
的最小区间类别
+ </li>
</ul></div>
-<div class="section" title="adjacent_filtered example">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a
name="range.reference.adaptors.reference.adjacent_filtered.adjacent_filtered_example"></a><a
class="link"
href="adjacent_filtered.html#range.reference.adaptors.reference.adjacent_filtered.adjacent_filtered_example"
title="adjacent_filtered example">
- adjacent_filtered example</a>
+<a
name="range.reference.adaptors.reference.adjacent_filtered.adjacent_filtered_example"></a><a
class="link"
href="adjacent_filtered.html#range.reference.adaptors.reference.adjacent_filtered.adjacent_filtered_example"
title="adjacent_filtered example 示例">
+ adjacent_filtered example 示例</a>
</h6></div></div></div>
<p>
@@ -134,7 +140,7 @@
</p>
</div>
<p>
- This would produce the output:
+ This would produce the output:<br>
生成以下输出:
</p>
<pre class="programlisting"><span class="number">1</span><span
class="special">,</span><span class="number">2</span><span
class="special">,</span><span class="number">3</span><span
class="special">,</span><span class="number">4</span><span
class="special">,</span><span class="number">5</span><span
class="special">,</span><span class="number">6</span>
</pre>
=======================================
---
/trunk/libs/range/doc/html/range/reference/adaptors/reference/copied.html
Mon May 31 00:54:22 2010
+++
/trunk/libs/range/doc/html/range/reference/adaptors/reference/copied.html
Tue Jun 22 21:13:43 2010
@@ -3,9 +3,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>copied</title>
<link rel="stylesheet"
href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../../../index.html"
title="Chapter 1. Range 2.0">
-<link rel="up" href="../reference.html" title="Reference">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../reference.html" title="Reference
参考手册">
<link rel="prev" href="adjacent_filtered.html" title="adjacent_filtered">
<link rel="next" href="filtered.html" title="filtered">
</head>
@@ -22,12 +22,12 @@
<div class="spirit-nav">
<a accesskey="p" href="adjacent_filtered.html"><img
src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../reference.html"><img
src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../../index.html"><img
src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="filtered.html"><img
src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="copied">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="range.reference.adaptors.reference.copied"></a><a class="link"
href="copied.html" title="copied"> copied</a>
</h5></div></div></div>
<div class="toc"><dl><dt><span class="section"><a
href="copied.html#range.reference.adaptors.reference.copied.copied_example">
- copied example</a></span></dt></dl></div>
+ copied example 示例</a></span></dt></dl></div>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -36,12 +36,12 @@
<thead><tr>
<th>
<p>
- Syntax
+ Syntax 语法
</p>
</th>
<th>
<p>
- Code
+ Code 代码
</p>
</th>
</tr></thead>
@@ -49,7 +49,7 @@
<tr>
<td>
<p>
- Pipe
+ Pipe 通道式
</p>
</td>
<td>
@@ -63,7 +63,7 @@
<tr>
<td>
<p>
- Function
+ Function 函数式
</p>
</td>
<td>
@@ -76,33 +76,40 @@
</tr>
</tbody>
</table></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
<span class="bold"><strong>Precondition:</strong></span><code
class="computeroutput"><span class="number">0</span>
<span class="special"><=</span> <span
class="identifier">n</span>
<span class="special">&&</span> <span
class="identifier">n</span>
<span class="special"><=</span> <span
class="identifier">m</span>
<span class="special">&&</span> <span
class="identifier">m</span>
- <span class="special"><</span> <span
class="identifier">distance</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">)</span></code>
+ <span class="special"><</span> <span
class="identifier">distance</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">)</span></code><br><span
class="bold"><strong>前提条件:</strong></span><code
class="computeroutput"><span class="number">0</span> <span
class="special"><=</span>
+ <span class="identifier">n</span> <span
class="special">&&</span>
+ <span class="identifier">n</span> <span
class="special"><=</span>
+ <span class="identifier">m</span> <span
class="special">&&</span>
+ <span class="identifier">m</span> <span
class="special"><</span>
+ <span class="identifier">distance</span><span
class="special">(</span><span class="identifier">rng</span><span
class="special">)</span></code>
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Returns:</strong></span> A new <code
class="computeroutput"><span class="identifier">iterator_range</span></code>
that holds the sliced range <code
class="computeroutput"><span class="special">[</span><span
class="identifier">n</span><span class="special">,</span><span
class="identifier">m</span><span class="special">)</span></code>
- of the original range.
+ of the original range.<br><span
class="bold"><strong>返回:</strong></span>
+ 一个新的 <code
class="computeroutput"><span
class="identifier">iterator_range</span></code>,持有原区间的片断区间
+ <code class="computeroutput"><span
class="special">[</span><span class="identifier">n</span><span
class="special">,</span><span class="identifier">m</span><span
class="special">)</span></code>。
</li>
-<li class="listitem">
-<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/random_access_range.html" title="Random Access
Range">Random
- Access Range</a>
+<li>
+<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/random_access_range.html" title="Random Access
Range 随机访问区间">Random
+ Access Range</a><br><span
class="bold"><strong>区间类别:</strong></span><a
class="link" href="../../../concepts/random_access_range.html"
title="Random Access Range
随机访问区间">Random Access Range</a>
</li>
-<li class="listitem">
-<span class="bold"><strong>Returned Range Category:</strong></span><a
class="link" href="../../../concepts/random_access_range.html"
title="Random Access Range">Random
- Access Range</a>
+<li>
+<span class="bold"><strong>Returned Range Category:</strong></span><a
class="link" href="../../../concepts/random_access_range.html"
title="Random Access Range
随机访问区间">Random
+ Access Range</a><br><span
class="bold"><strong>返回类型类型:</strong></span><a
class="link" href="../../../concepts/random_access_range.html"
title="Random Access Range
随机访问区间">Random Access Range</a>
</li>
</ul></div>
-<div class="section" title="copied example">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="range.reference.adaptors.reference.copied.copied_example"></a><a
class="link"
href="copied.html#range.reference.adaptors.reference.copied.copied_example"
title="copied example">
- copied example</a>
+<a name="range.reference.adaptors.reference.copied.copied_example"></a><a
class="link"
href="copied.html#range.reference.adaptors.reference.copied.copied_example"
title="copied example 示例">
+ copied example 示例</a>
</h6></div></div></div>
<p>
@@ -133,7 +140,7 @@
</p>
</div>
<p>
- This would produce the output:
+ This would produce the output:<br>
生成以下输出:
</p>
<pre class="programlisting"><span class="number">2</span><span
class="special">,</span><span class="number">3</span><span
class="special">,</span><span class="number">4</span><span
class="special">,</span><span class="number">5</span>
</pre>
=======================================
---
/trunk/libs/range/doc/html/range/reference/adaptors/reference/filtered.html
Mon May 31 00:54:22 2010
+++
/trunk/libs/range/doc/html/range/reference/adaptors/reference/filtered.html
Tue Jun 22 21:13:43 2010
@@ -3,9 +3,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>filtered</title>
<link rel="stylesheet"
href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../../../index.html"
title="Chapter 1. Range 2.0">
-<link rel="up" href="../reference.html" title="Reference">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../reference.html" title="Reference
参考手册">
<link rel="prev" href="copied.html" title="copied">
<link rel="next" href="indexed.html" title="indexed">
</head>
@@ -22,12 +22,12 @@
<div class="spirit-nav">
<a accesskey="p" href="copied.html"><img
src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../reference.html"><img
src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../../index.html"><img
src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="indexed.html"><img
src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="filtered">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="range.reference.adaptors.reference.filtered"></a><a class="link"
href="filtered.html" title="filtered"> filtered</a>
</h5></div></div></div>
<div class="toc"><dl><dt><span class="section"><a
href="filtered.html#range.reference.adaptors.reference.filtered.filtered_example">
- filtered example</a></span></dt></dl></div>
+ filtered example 示例</a></span></dt></dl></div>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -36,12 +36,12 @@
<thead><tr>
<th>
<p>
- Syntax
+ Syntax 语法
</p>
</th>
<th>
<p>
- Code
+ Code 代码
</p>
</th>
</tr></thead>
@@ -49,7 +49,7 @@
<tr>
<td>
<p>
- Pipe
+ Pipe 通道式
</p>
</td>
<td>
@@ -62,7 +62,7 @@
<tr>
<td>
<p>
- Function
+ Function 函数式
</p>
</td>
<td>
@@ -74,35 +74,38 @@
</tr>
</tbody>
</table></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
<span class="bold"><strong>Precondition:</strong></span> The <code
class="computeroutput"><span class="identifier">value_type</span></code>
- of the range is convertible to the argument type of <code
class="computeroutput"><span class="identifier">pred</span></code>.
+ of the range is convertible to the argument type of <code
class="computeroutput"><span
class="identifier">pred</span></code>.<br><span
class="bold"><strong>前提条件:</strong></span>
区间的 <code class="computeroutput"><span
class="identifier">value_type</span></code>
可转换为 <code class="computeroutput"><span
class="identifier">pred</span></code>
的参数类型。
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Postcondition:</strong></span> For all adjacent
elements
<code class="computeroutput"><span
class="special">[</span><span class="identifier">x</span><span
class="special">]</span></code> in the returned range, <code
class="computeroutput"><span class="identifier">pred</span><span
class="special">(</span><span class="identifier">x</span><span
class="special">)</span></code>
- is <code class="computeroutput"><span
class="keyword">true</span></code>.
+ is <code class="computeroutput"><span
class="keyword">true</span></code>.<br><span
class="bold"><strong>后验条件:</strong></span>
对于返回区间中的所有元素
+ <code class="computeroutput"><span
class="special">[</span><span class="identifier">x</span><span
class="special">]</span></code>,<code class="computeroutput"><span
class="identifier">pred</span><span class="special">(</span><span
class="identifier">x</span><span class="special">)</span></code> 为
<code class="computeroutput"><span class="keyword">true</span></code>.
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Throws:</strong></span> Whatever the copy
constructor
- of <code class="computeroutput"><span
class="identifier">pred</span></code> might throw.
+ of <code class="computeroutput"><span
class="identifier">pred</span></code> might throw.<br><span
class="bold"><strong>抛出:</strong></span><code
class="computeroutput"><span class="identifier">pred</span></code>
+
的复制构造函数可能抛出的任何异常。
</li>
-<li class="listitem">
-<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/forward_range.html" title="Forward Range">Forward
- Range</a>
+<li>
+<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/forward_range.html" title="Forward Range
前向区间">Forward
+ Range</a><br><span
class="bold"><strong>区间类别:</strong></span><a
class="link" href="../../../concepts/forward_range.html" title="Forward
Range 前向区间">Forward Range</a>
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Returned Range Category:</strong></span> The
minimum
of the range category of <code class="computeroutput"><span
class="identifier">rng</span></code>
- and <a class="link"
href="../../../concepts/bidirectional_range.html" title="Bidirectional
Range">Bidirectional
- Range</a>
-</li>
+ and <a class="link"
href="../../../concepts/bidirectional_range.html" title="Bidirectional
Range 双向区间">Bidirectional
+ Range</a><br><span
class="bold"><strong>返回区间类别:</strong></span><code
class="computeroutput"><span class="identifier">rng</span></code> 和
<a class="link" href="../../../concepts/bidirectional_range.html"
title="Bidirectional Range 双向区间">Bidirectional
+ Range</a>
的最小区间类别
+ </li>
</ul></div>
-<div class="section" title="filtered example">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a
name="range.reference.adaptors.reference.filtered.filtered_example"></a><a
class="link"
href="filtered.html#range.reference.adaptors.reference.filtered.filtered_example"
title="filtered example">
- filtered example</a>
+<a
name="range.reference.adaptors.reference.filtered.filtered_example"></a><a
class="link"
href="filtered.html#range.reference.adaptors.reference.filtered.filtered_example"
title="filtered example 示例">
+ filtered example 示例</a>
</h6></div></div></div>
<p>
@@ -136,7 +139,7 @@
</p>
</div>
<p>
- This would produce the output:
+ This would produce the output:<br>
生成以下输出:
</p>
<pre class="programlisting"><span class="number">2</span><span
class="special">,</span><span class="number">4</span><span
class="special">,</span><span class="number">6</span><span
class="special">,</span><span class="number">8</span>
</pre>
=======================================
---
/trunk/libs/range/doc/html/range/reference/adaptors/reference/indexed.html
Mon May 31 00:54:22 2010
+++
/trunk/libs/range/doc/html/range/reference/adaptors/reference/indexed.html
Tue Jun 22 21:13:43 2010
@@ -3,9 +3,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>indexed</title>
<link rel="stylesheet"
href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../../../index.html"
title="Chapter 1. Range 2.0">
-<link rel="up" href="../reference.html" title="Reference">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../reference.html" title="Reference
参考手册">
<link rel="prev" href="filtered.html" title="filtered">
<link rel="next" href="indirected.html" title="indirected">
</head>
@@ -22,12 +22,12 @@
<div class="spirit-nav">
<a accesskey="p" href="filtered.html"><img
src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../reference.html"><img
src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../../index.html"><img
src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="indirected.html"><img
src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="indexed">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="range.reference.adaptors.reference.indexed"></a><a class="link"
href="indexed.html" title="indexed"> indexed</a>
</h5></div></div></div>
<div class="toc"><dl><dt><span class="section"><a
href="indexed.html#range.reference.adaptors.reference.indexed.indexed_example">
- indexed example</a></span></dt></dl></div>
+ indexed example 示例</a></span></dt></dl></div>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -36,12 +36,12 @@
<thead><tr>
<th>
<p>
- Syntax
+ Syntax 语法
</p>
</th>
<th>
<p>
- Code
+ Code 代码
</p>
</th>
</tr></thead>
@@ -49,7 +49,7 @@
<tr>
<td>
<p>
- Pipe
+ Pipe 通道式
</p>
</td>
<td>
@@ -62,7 +62,7 @@
<tr>
<td>
<p>
- Function
+ Function 函数式
</p>
</td>
<td>
@@ -73,28 +73,30 @@
</tr>
</tbody>
</table></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
<span class="bold"><strong>Returns:</strong></span> A range adapted to
return
both the element and the associated index. The returned
range consists
of iterators that have in addition to the usual iterator
member functions
an <code class="computeroutput"><span
class="identifier">index</span><span class="special">()</span></code>
member function that returns the appropriate index for the
element
- in the sequence corresponding with the iterator.
+ in the sequence corresponding with the iterator.<br><span
class="bold"><strong>返回:</strong></span>
+
一个区间,被适配为同时返回元素及其相应索引号。返回的区间所包含的迭代器比普通的迭代器多一个成员函数
+ <code class="computeroutput"><span
class="identifier">index</span><span
class="special">()</span></code>,它返回与迭代器相对应的元素在序列中的相关索引。
</li>
-<li class="listitem">
-<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/single_pass_range.html" title="Single Pass
Range">Single
- Pass Range</a>
+<li>
+<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/single_pass_range.html" title="Single Pass Range
单遍区间">Single
+ Pass Range</a><br><span
class="bold"><strong>区间类别:</strong></span><a
class="link" href="../../../concepts/single_pass_range.html" title="Single
Pass Range 单遍区间">Single Pass Range</a>
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Returned Range Category:</strong></span> The
range
- category of <code class="computeroutput"><span
class="identifier">rng</span></code>
-</li>
+ category of <code class="computeroutput"><span
class="identifier">rng</span></code><br><span
class="bold"><strong>返回区间类别:</strong></span><code
class="computeroutput"><span class="identifier">rng</span></code>
的区间类别
+ </li>
</ul></div>
-<div class="section" title="indexed example">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a
name="range.reference.adaptors.reference.indexed.indexed_example"></a><a
class="link"
href="indexed.html#range.reference.adaptors.reference.indexed.indexed_example"
title="indexed example">
- indexed example</a>
+<a
name="range.reference.adaptors.reference.indexed.indexed_example"></a><a
class="link"
href="indexed.html#range.reference.adaptors.reference.indexed.indexed_example"
title="indexed example 示例">
+ indexed example 示例</a>
</h6></div></div></div>
<p>
@@ -159,7 +161,7 @@
</p>
</div>
<p>
- This would produce the output:
+ This would produce the output:<br>
生成以下输出:
</p>
<pre class="programlisting"><span class="identifier">Element</span> <span
class="special">=</span> <span class="number">10</span> <span
class="identifier">Index</span> <span class="special">=</span> <span
class="number">0</span>
<span class="identifier">Element</span> <span class="special">=</span>
<span class="number">20</span> <span class="identifier">Index</span> <span
class="special">=</span> <span class="number">1</span>
=======================================
---
/trunk/libs/range/doc/html/range/reference/adaptors/reference/indirected.html
Mon May 31 00:54:22 2010
+++
/trunk/libs/range/doc/html/range/reference/adaptors/reference/indirected.html
Tue Jun 22 21:13:43 2010
@@ -3,9 +3,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>indirected</title>
<link rel="stylesheet"
href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../../../index.html"
title="Chapter 1. Range 2.0">
-<link rel="up" href="../reference.html" title="Reference">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../reference.html" title="Reference
参考手册">
<link rel="prev" href="indexed.html" title="indexed">
<link rel="next" href="map_keys.html" title="map_keys">
</head>
@@ -22,12 +22,12 @@
<div class="spirit-nav">
<a accesskey="p" href="indexed.html"><img
src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../reference.html"><img
src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../../index.html"><img
src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="map_keys.html"><img
src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="indirected">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="range.reference.adaptors.reference.indirected"></a><a
class="link" href="indirected.html" title="indirected"> indirected</a>
</h5></div></div></div>
<div class="toc"><dl><dt><span class="section"><a
href="indirected.html#range.reference.adaptors.reference.indirected.indirected_example">
- indirected example</a></span></dt></dl></div>
+ indirected example 示例</a></span></dt></dl></div>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -36,12 +36,12 @@
<thead><tr>
<th>
<p>
- Syntax
+ Syntax 语法
</p>
</th>
<th>
<p>
- Code
+ Code 代码
</p>
</th>
</tr></thead>
@@ -49,7 +49,7 @@
<tr>
<td>
<p>
- Pipe
+ Pipe 通道式
</p>
</td>
<td>
@@ -62,7 +62,7 @@
<tr>
<td>
<p>
- Function
+ Function 函数式
</p>
</td>
<td>
@@ -73,29 +73,33 @@
</tr>
</tbody>
</table></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
<span class="bold"><strong>Precondition:</strong></span> The <code
class="computeroutput"><span class="identifier">value_type</span></code>
- of the range defines unary <code
class="computeroutput"><span class="keyword">operator</span><span
class="special">*()</span></code>
+ of the range defines unary <code
class="computeroutput"><span class="keyword">operator</span><span
class="special">*()</span></code><br><span
class="bold"><strong>前提条件:</strong></span>
+ 区间的 <code class="computeroutput"><span
class="identifier">value_type</span></code>
+ 定义了单参 <code
class="computeroutput"><span class="keyword">operator</span><span
class="special">*()</span></code>
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Postcondition:</strong></span> For all elements
<code class="computeroutput"><span class="identifier">x</span></code> in
the returned range, <code class="computeroutput"><span
class="identifier">x</span></code> is the result of <code
class="computeroutput"><span class="special">*</span><span
class="identifier">y</span></code>
where <code class="computeroutput"><span
class="identifier">y</span></code> is the corresponding
- element in the original range.
+ element in the original range.<br><span
class="bold"><strong>后验条件:</strong></span>
+
对于返回区间中的所有元素
<code class="computeroutput"><span
class="identifier">x</span></code>,<code
class="computeroutput"><span class="identifier">x</span></code> 为
<code class="computeroutput"><span class="special">*</span><span
class="identifier">y</span></code>,其中 <code
class="computeroutput"><span class="identifier">y</span></code>
+
为原区间中的对应元素。
</li>
-<li class="listitem">
-<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/single_pass_range.html" title="Single Pass
Range">Single
- Pass Range</a>
+<li>
+<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/single_pass_range.html" title="Single Pass Range
单遍区间">Single
+ Pass Range</a><br><span
class="bold"><strong>区间类别:</strong></span><a
class="link" href="../../../concepts/single_pass_range.html" title="Single
Pass Range 单遍区间">Single Pass Range</a>
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Returned Range Category:</strong></span> The
range
- category of <code class="computeroutput"><span
class="identifier">rng</span></code>
-</li>
+ category of <code class="computeroutput"><span
class="identifier">rng</span></code><br><span
class="bold"><strong>返回区间类别:</strong></span><code
class="computeroutput"><span class="identifier">rng</span></code>
的区间类别
+ </li>
</ul></div>
-<div class="section" title="indirected example">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a
name="range.reference.adaptors.reference.indirected.indirected_example"></a><a
class="link"
href="indirected.html#range.reference.adaptors.reference.indirected.indirected_example"
title="indirected example">
- indirected example</a>
+<a
name="range.reference.adaptors.reference.indirected.indirected_example"></a><a
class="link"
href="indirected.html#range.reference.adaptors.reference.indirected.indirected_example"
title="indirected example 示例">
+ indirected example 示例</a>
</h6></div></div></div>
<p>
@@ -127,7 +131,7 @@
</p>
</div>
<p>
- This would produce the output:
+ This would produce the output:<br>
生成以下输出:
</p>
<pre class="programlisting"><span class="number">0</span><span
class="special">,</span><span class="number">1</span><span
class="special">,</span><span class="number">2</span><span
class="special">,</span><span class="number">3</span><span
class="special">,</span><span class="number">4</span><span
class="special">,</span><span class="number">5</span><span
class="special">,</span><span class="number">6</span><span
class="special">,</span><span class="number">7</span><span
class="special">,</span><span class="number">8</span><span
class="special">,</span><span class="number">9</span>
</pre>
=======================================
---
/trunk/libs/range/doc/html/range/reference/adaptors/reference/map_keys.html
Mon May 31 00:54:22 2010
+++
/trunk/libs/range/doc/html/range/reference/adaptors/reference/map_keys.html
Tue Jun 22 21:13:43 2010
@@ -3,9 +3,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>map_keys</title>
<link rel="stylesheet"
href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../../../index.html"
title="Chapter 1. Range 2.0">
-<link rel="up" href="../reference.html" title="Reference">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../reference.html" title="Reference
参考手册">
<link rel="prev" href="indirected.html" title="indirected">
<link rel="next" href="map_values.html" title="map_values">
</head>
@@ -22,12 +22,12 @@
<div class="spirit-nav">
<a accesskey="p" href="indirected.html"><img
src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../reference.html"><img
src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../../index.html"><img
src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="map_values.html"><img
src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="map_keys">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="range.reference.adaptors.reference.map_keys"></a><a class="link"
href="map_keys.html" title="map_keys"> map_keys</a>
</h5></div></div></div>
<div class="toc"><dl><dt><span class="section"><a
href="map_keys.html#range.reference.adaptors.reference.map_keys.map_keys_example">
- map_keys example</a></span></dt></dl></div>
+ map_keys example 示例</a></span></dt></dl></div>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -36,12 +36,12 @@
<thead><tr>
<th>
<p>
- Syntax
+ Syntax 语法
</p>
</th>
<th>
<p>
- Code
+ Code 代码
</p>
</th>
</tr></thead>
@@ -49,7 +49,7 @@
<tr>
<td>
<p>
- Pipe
+ Pipe 通道式
</p>
</td>
<td>
@@ -62,7 +62,7 @@
<tr>
<td>
<p>
- Function
+ Function 函数式
</p>
</td>
<td>
@@ -73,28 +73,31 @@
</tr>
</tbody>
</table></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
<span class="bold"><strong>Precondition:</strong></span> The <code
class="computeroutput"><span class="identifier">value_type</span></code>
- of the range is an instantiation of <code
class="computeroutput"><span class="identifier">std</span><span
class="special">::</span><span class="identifier">pair</span></code>.
+ of the range is an instantiation of <code
class="computeroutput"><span class="identifier">std</span><span
class="special">::</span><span
class="identifier">pair</span></code>.<br><span
class="bold"><strong>前提条件:</strong></span>
区间的 <code class="computeroutput"><span
class="identifier">value_type</span></code> 是一个 <code
class="computeroutput"><span class="identifier">std</span><span
class="special">::</span><span class="identifier">pair</span></code>
实例。
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Postcondition:</strong></span> For all elements
<code class="computeroutput"><span class="identifier">x</span></code> in
the returned range, <code class="computeroutput"><span
class="identifier">x</span></code> is the result of <code
class="computeroutput"><span class="identifier">y</span><span
class="special">.</span><span class="identifier">first</span></code> where
<code class="computeroutput"><span class="identifier">y</span></code>
- is the corresponding element in the original range.
+ is the corresponding element in the original range.<br><span
class="bold"><strong>后验条件:</strong></span>
对于返回区间中的所有元素
+ <code class="computeroutput"><span
class="identifier">x</span></code>,<code
class="computeroutput"><span class="identifier">x</span></code>
+ 为 <code class="computeroutput"><span
class="identifier">y</span><span class="special">.</span><span
class="identifier">first</span></code>,其中 <code
class="computeroutput"><span class="identifier">y</span></code>
+
为原区间中的对应元素。
</li>
-<li class="listitem">
-<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/single_pass_range.html" title="Single Pass
Range">Single
- Pass Range</a>
+<li>
+<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/single_pass_range.html" title="Single Pass Range
单遍区间">Single
+ Pass Range</a><br><span
class="bold"><strong>区间类别:</strong></span><a
class="link" href="../../../concepts/single_pass_range.html" title="Single
Pass Range 单遍区间">Single Pass Range</a>
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Returned Range Category:</strong></span> The
range
- category of <code class="computeroutput"><span
class="identifier">rng</span></code>.
+ category of <code class="computeroutput"><span
class="identifier">rng</span></code>.<br><span
class="bold"><strong>返回区间类别:</strong></span><code
class="computeroutput"><span class="identifier">rng</span></code>
的区间类别。
</li>
</ul></div>
-<div class="section" title="map_keys example">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a
name="range.reference.adaptors.reference.map_keys.map_keys_example"></a><a
class="link"
href="map_keys.html#range.reference.adaptors.reference.map_keys.map_keys_example"
title="map_keys example">
- map_keys example</a>
+<a
name="range.reference.adaptors.reference.map_keys.map_keys_example"></a><a
class="link"
href="map_keys.html#range.reference.adaptors.reference.map_keys.map_keys_example"
title="map_keys example 示例">
+ map_keys example 示例</a>
</h6></div></div></div>
<p>
@@ -127,7 +130,7 @@
</p>
</div>
<p>
- This would produce the output:
+ This would produce the output:<br>
生成以下输出:
</p>
<pre class="programlisting"><span class="number">0</span><span
class="special">,</span><span class="number">1</span><span
class="special">,</span><span class="number">2</span><span
class="special">,</span><span class="number">3</span><span
class="special">,</span><span class="number">4</span><span
class="special">,</span><span class="number">5</span><span
class="special">,</span><span class="number">6</span><span
class="special">,</span><span class="number">7</span><span
class="special">,</span><span class="number">8</span><span
class="special">,</span><span class="number">9</span>
</pre>
=======================================
---
/trunk/libs/range/doc/html/range/reference/adaptors/reference/map_values.html
Mon May 31 00:54:22 2010
+++
/trunk/libs/range/doc/html/range/reference/adaptors/reference/map_values.html
Tue Jun 22 21:13:43 2010
@@ -3,9 +3,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>map_values</title>
<link rel="stylesheet"
href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../../../index.html"
title="Chapter 1. Range 2.0">
-<link rel="up" href="../reference.html" title="Reference">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../reference.html" title="Reference
参考手册">
<link rel="prev" href="map_keys.html" title="map_keys">
<link rel="next" href="replaced.html" title="replaced">
</head>
@@ -22,12 +22,12 @@
<div class="spirit-nav">
<a accesskey="p" href="map_keys.html"><img
src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../reference.html"><img
src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../../index.html"><img
src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="replaced.html"><img
src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="map_values">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="range.reference.adaptors.reference.map_values"></a><a
class="link" href="map_values.html" title="map_values"> map_values</a>
</h5></div></div></div>
<div class="toc"><dl><dt><span class="section"><a
href="map_values.html#range.reference.adaptors.reference.map_values.map_values_example">
- map_values example</a></span></dt></dl></div>
+ map_values example 示例</a></span></dt></dl></div>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -36,12 +36,12 @@
<thead><tr>
<th>
<p>
- Syntax
+ Syntax 语法
</p>
</th>
<th>
<p>
- Code
+ Code 代码
</p>
</th>
</tr></thead>
@@ -49,7 +49,7 @@
<tr>
<td>
<p>
- Pipe
+ Pipe 通道式
</p>
</td>
<td>
@@ -62,7 +62,7 @@
<tr>
<td>
<p>
- Function
+ Function 函数式
</p>
</td>
<td>
@@ -73,28 +73,30 @@
</tr>
</tbody>
</table></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
<span class="bold"><strong>Precondition:</strong></span> The <code
class="computeroutput"><span class="identifier">value_type</span></code>
- of the range is an instantiation of <code
class="computeroutput"><span class="identifier">std</span><span
class="special">::</span><span class="identifier">pair</span></code>.
+ of the range is an instantiation of <code
class="computeroutput"><span class="identifier">std</span><span
class="special">::</span><span
class="identifier">pair</span></code>.<br><span
class="bold"><strong>前提条件:</strong></span>
区间的 <code class="computeroutput"><span
class="identifier">value_type</span></code> 是一个 <code
class="computeroutput"><span class="identifier">std</span><span
class="special">::</span><span class="identifier">pair</span></code>
实例。
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Postcondition:</strong></span> For all elements
<code class="computeroutput"><span class="identifier">x</span></code> in
the returned range, <code class="computeroutput"><span
class="identifier">x</span></code> is the result of <code
class="computeroutput"><span class="identifier">y</span><span
class="special">.</span><span class="identifier">second</span></code> where
<code class="computeroutput"><span class="identifier">y</span></code>
- is the corresponding element in the original range.
+ is the corresponding element in the original range.<br><span
class="bold"><strong>后验条件:</strong></span>
对于返回区间中的所有元素
+ <code class="computeroutput"><span
class="identifier">x</span></code>,<code
class="computeroutput"><span class="identifier">x</span></code>
+ 为 <code class="computeroutput"><span
class="identifier">y</span><span class="special">.</span><span
class="identifier">second</span></code>
的结果,其中 <code
class="computeroutput"><span class="identifier">y</span></code>
为原区间中的对应元素。
</li>
-<li class="listitem">
-<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/single_pass_range.html" title="Single Pass
Range">Single
- Pass Range</a>
+<li>
+<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/single_pass_range.html" title="Single Pass Range
单遍区间">Single
+ Pass Range</a><br><span
class="bold"><strong>区间类别:</strong></span><a
class="link" href="../../../concepts/single_pass_range.html" title="Single
Pass Range 单遍区间">Single Pass Range</a>
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Returned Range Category:</strong></span> The
range
- category of <code class="computeroutput"><span
class="identifier">rng</span></code>.
+ category of <code class="computeroutput"><span
class="identifier">rng</span></code>.<br><span
class="bold"><strong>返回区间类别:</strong></span><code
class="computeroutput"><span class="identifier">rng</span></code>
的区间类别。
</li>
</ul></div>
-<div class="section" title="map_values example">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a
name="range.reference.adaptors.reference.map_values.map_values_example"></a><a
class="link"
href="map_values.html#range.reference.adaptors.reference.map_values.map_values_example"
title="map_values example">
- map_values example</a>
+<a
name="range.reference.adaptors.reference.map_values.map_values_example"></a><a
class="link"
href="map_values.html#range.reference.adaptors.reference.map_values.map_values_example"
title="map_values example 示例">
+ map_values example 示例</a>
</h6></div></div></div>
<p>
@@ -127,7 +129,7 @@
</p>
</div>
<p>
- This would produce the output:
+ This would produce the output:<br>
生成以下输出:
</p>
<pre class="programlisting"><span class="number">0</span><span
class="special">,</span><span class="number">10</span><span
class="special">,</span><span class="number">20</span><span
class="special">,</span><span class="number">30</span><span
class="special">,</span><span class="number">40</span><span
class="special">,</span><span class="number">50</span><span
class="special">,</span><span class="number">60</span><span
class="special">,</span><span class="number">70</span><span
class="special">,</span><span class="number">80</span><span
class="special">,</span><span class="number">90</span>
</pre>
=======================================
---
/trunk/libs/range/doc/html/range/reference/adaptors/reference/replaced.html
Mon May 31 00:54:22 2010
+++
/trunk/libs/range/doc/html/range/reference/adaptors/reference/replaced.html
Tue Jun 22 21:13:43 2010
@@ -3,9 +3,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>replaced</title>
<link rel="stylesheet"
href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../../../index.html"
title="Chapter 1. Range 2.0">
-<link rel="up" href="../reference.html" title="Reference">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../reference.html" title="Reference
参考手册">
<link rel="prev" href="map_values.html" title="map_values">
<link rel="next" href="replaced_if.html" title="replaced_if">
</head>
@@ -22,12 +22,12 @@
<div class="spirit-nav">
<a accesskey="p" href="map_values.html"><img
src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../reference.html"><img
src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../../index.html"><img
src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="replaced_if.html"><img
src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="replaced">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="range.reference.adaptors.reference.replaced"></a><a class="link"
href="replaced.html" title="replaced"> replaced</a>
</h5></div></div></div>
<div class="toc"><dl><dt><span class="section"><a
href="replaced.html#range.reference.adaptors.reference.replaced.replaced_example">
- replaced example</a></span></dt></dl></div>
+ replaced example 示例</a></span></dt></dl></div>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -36,12 +36,12 @@
<thead><tr>
<th>
<p>
- Syntax
+ Syntax 语法
</p>
</th>
<th>
<p>
- Code
+ Code 代码
</p>
</th>
</tr></thead>
@@ -49,7 +49,7 @@
<tr>
<td>
<p>
- Pipe
+ Pipe 通道式
</p>
</td>
<td>
@@ -63,7 +63,7 @@
<tr>
<td>
<p>
- Function
+ Function 函数式
</p>
</td>
<td>
@@ -76,42 +76,48 @@
</tr>
</tbody>
</table></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
-<span class="bold"><strong>Precondition:</strong></span><div
class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Precondition:</strong></span><br><span
class="bold"><strong>前提条件:</strong></span><div
class="itemizedlist"><ul type="circle">
+<li>
<code class="computeroutput"><span
class="identifier">new_value</span></code> is convertible
to the <code class="computeroutput"><span
class="identifier">value_type</span></code>
- of the range.
+ of the range.<br><code class="computeroutput"><span
class="identifier">new_value</span></code>
+ 可转换为区间的
<code class="computeroutput"><span
class="identifier">value_type</span></code>。
</li>
-<li class="listitem">
+<li>
<code class="computeroutput"><span
class="identifier">old_value</span></code> is convertible
to the <code class="computeroutput"><span
class="identifier">value_type</span></code>
- of the range.
+ of the range.<br><code class="computeroutput"><span
class="identifier">old_value</span></code>
+ 可转换为区间的
<code class="computeroutput"><span
class="identifier">value_type</span></code>。
</li>
</ul></div>
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Postcondition:</strong></span> For all elements
<code class="computeroutput"><span class="identifier">x</span></code> in
the returned range, the value
<code class="computeroutput"><span
class="identifier">x</span></code> is equal to the value
of <code class="computeroutput"><span
class="special">(</span><span class="identifier">y</span>
<span class="special">==</span> <span
class="identifier">old_value</span><span class="special">)</span> <span
class="special">?</span> <span class="identifier">new_value</span> <span
class="special">:</span>
<span class="identifier">y</span></code> where <code
class="computeroutput"><span class="identifier">y</span></code>
- is the corresponding element in the original range.
+ is the corresponding element in the original range.<br><span
class="bold"><strong>后验条件:</strong></span>
对于返回区间中的所有元素
+ <code class="computeroutput"><span
class="identifier">x</span></code>,值 <code
class="computeroutput"><span class="identifier">x</span></code>
等于 <code class="computeroutput"><span
class="special">(</span><span class="identifier">y</span> <span
class="special">==</span> <span class="identifier">old_value</span><span
class="special">)</span>
+ <span class="special">?</span> <span
class="identifier">new_value</span>
+ <span class="special">:</span> <span
class="identifier">y</span></code>
+ 的值,其中 <code
class="computeroutput"><span class="identifier">y</span></code>
为原区间中的对应元素。
</li>
-<li class="listitem">
-<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/forward_range.html" title="Forward Range">Forward
- Range</a>
+<li>
+<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/forward_range.html" title="Forward Range
前向区间">Forward
+ Range</a><br><span
class="bold"><strong>区间类别:</strong></span><a
class="link" href="../../../concepts/forward_range.html" title="Forward
Range 前向区间">Forward Range</a>
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Returned Range Category:</strong></span> The
range
- category of <code class="computeroutput"><span
class="identifier">rng</span></code>.
+ category of <code class="computeroutput"><span
class="identifier">rng</span></code>.<br><span
class="bold"><strong>返回区间类别:</strong></span><code
class="computeroutput"><span class="identifier">rng</span></code>
的区间类别。
</li>
</ul></div>
-<div class="section" title="replaced example">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a
name="range.reference.adaptors.reference.replaced.replaced_example"></a><a
class="link"
href="replaced.html#range.reference.adaptors.reference.replaced.replaced_example"
title="replaced example">
- replaced example</a>
+<a
name="range.reference.adaptors.reference.replaced.replaced_example"></a><a
class="link"
href="replaced.html#range.reference.adaptors.reference.replaced.replaced_example"
title="replaced example 示例">
+ replaced example 示例</a>
</h6></div></div></div>
<p>
@@ -142,7 +148,7 @@
</p>
</div>
<p>
- This would produce the output:
+ This would produce the output:<br>
生成以下输出:
</p>
<pre class="programlisting"><span class="number">1</span><span
class="special">,</span><span class="number">10</span><span
class="special">,</span><span class="number">3</span><span
class="special">,</span><span class="number">10</span><span
class="special">,</span><span class="number">5</span><span
class="special">,</span><span class="number">10</span><span
class="special">,</span><span class="number">7</span><span
class="special">,</span><span class="number">10</span><span
class="special">,</span><span class="number">9</span>
</pre>
=======================================
---
/trunk/libs/range/doc/html/range/reference/adaptors/reference/replaced_if.html
Mon May 31 00:54:22 2010
+++
/trunk/libs/range/doc/html/range/reference/adaptors/reference/replaced_if.html
Tue Jun 22 21:13:43 2010
@@ -3,9 +3,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>replaced_if</title>
<link rel="stylesheet"
href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../../../index.html"
title="Chapter 1. Range 2.0">
-<link rel="up" href="../reference.html" title="Reference">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../reference.html" title="Reference
参考手册">
<link rel="prev" href="replaced.html" title="replaced">
<link rel="next" href="reversed.html" title="reversed">
</head>
@@ -22,13 +22,13 @@
<div class="spirit-nav">
<a accesskey="p" href="replaced.html"><img
src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../reference.html"><img
src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../../index.html"><img
src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="reversed.html"><img
src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="replaced_if">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="range.reference.adaptors.reference.replaced_if"></a><a
class="link" href="replaced_if.html" title="replaced_if">
replaced_if</a>
</h5></div></div></div>
<div class="toc"><dl><dt><span class="section"><a
href="replaced_if.html#range.reference.adaptors.reference.replaced_if.replaced_if_example">
- replaced_if example</a></span></dt></dl></div>
+ replaced_if example 示例</a></span></dt></dl></div>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -37,12 +37,12 @@
<thead><tr>
<th>
<p>
- Syntax
+ Syntax 语法
</p>
</th>
<th>
<p>
- Code
+ Code 代码
</p>
</th>
</tr></thead>
@@ -50,7 +50,7 @@
<tr>
<td>
<p>
- Pipe
+ Pipe 通道式
</p>
</td>
<td>
@@ -64,7 +64,7 @@
<tr>
<td>
<p>
- Function
+ Function 函数式
</p>
</td>
<td>
@@ -77,41 +77,47 @@
</tr>
</tbody>
</table></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
-<span class="bold"><strong>Precondition:</strong></span><div
class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Precondition:</strong></span><br><span
class="bold"><strong>前提条件:</strong></span><div
class="itemizedlist"><ul type="circle">
+<li>
The range <code class="computeroutput"><span
class="identifier">value_type</span></code>
- is convertible to the argument type of <code
class="computeroutput"><span class="identifier">pred</span></code>.
+ is convertible to the argument type of <code
class="computeroutput"><span class="identifier">pred</span></code>.<br>
+ 区间的 <code
class="computeroutput"><span class="identifier">value_type</span></code>
+ 可转换为 <code
class="computeroutput"><span class="identifier">pred</span></code>
+ 的参数类型。
</li>
-<li class="listitem">
+<li>
<code class="computeroutput"><span
class="identifier">new_value</span></code> is convertible
to the <code class="computeroutput"><span
class="identifier">value_type</span></code>
- of the range.
+ of the range.<br><code class="computeroutput"><span
class="identifier">new_value</span></code>
+ 可转换为区间的
<code class="computeroutput"><span
class="identifier">value_type</span></code>。
</li>
</ul></div>
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Postconditions:</strong></span> For all elements
<code class="computeroutput"><span
class="identifier">x</span></code> in the returned range,
the value <code class="computeroutput"><span
class="identifier">x</span></code> is equal
to the value of <code class="computeroutput"><span
class="identifier">pred</span><span class="special">(</span><span
class="identifier">y</span><span class="special">)</span> <span
class="special">?</span> <span class="identifier">new_value</span> <span
class="special">:</span>
<span class="identifier">y</span></code> where <code
class="computeroutput"><span class="identifier">y</span></code>
- is the corresponding element in the original range.
+ is the corresponding element in the original range.<br><span
class="bold"><strong>后验条件:</strong></span>
对于返回区间中的所有元素
+ <code class="computeroutput"><span
class="identifier">x</span></code>,值 <code
class="computeroutput"><span class="identifier">x</span></code>
等于 <code class="computeroutput"><span
class="identifier">pred</span><span class="special">(</span><span
class="identifier">y</span><span class="special">)</span> <span
class="special">?</span> <span class="identifier">new_value</span> <span
class="special">:</span>
+ <span class="identifier">y</span></code>
的值,其中 <code class="computeroutput"><span
class="identifier">y</span></code>
为原区间中的对应元素。
</li>
-<li class="listitem">
-<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/forward_range.html" title="Forward Range">Forward
- Range</a>
+<li>
+<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/forward_range.html" title="Forward Range
前向区间">Forward
+ Range</a><br><span
class="bold"><strong>区间类别:</strong></span><a
class="link" href="../../../concepts/forward_range.html" title="Forward
Range 前向区间">Forward Range</a>
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Returned Range Category:</strong></span> The
range
- category of <code class="computeroutput"><span
class="identifier">rng</span></code>.
+ category of <code class="computeroutput"><span
class="identifier">rng</span></code>.<br><span
class="bold"><strong>返回区间类别:</strong></span><code
class="computeroutput"><span class="identifier">rng</span></code>
的区间类别。
</li>
</ul></div>
-<div class="section" title="replaced_if example">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a
name="range.reference.adaptors.reference.replaced_if.replaced_if_example"></a><a
class="link"
href="replaced_if.html#range.reference.adaptors.reference.replaced_if.replaced_if_example"
title="replaced_if example">
- replaced_if example</a>
+<a
name="range.reference.adaptors.reference.replaced_if.replaced_if_example"></a><a
class="link"
href="replaced_if.html#range.reference.adaptors.reference.replaced_if.replaced_if_example"
title="replaced_if example 示例">
+ replaced_if example 示例</a>
</h6></div></div></div>
<p>
@@ -147,7 +153,7 @@
</p>
</div>
<p>
- This would produce the output:
+ This would produce the output:<br>
生成以下输出:
</p>
<pre class="programlisting"><span class="number">1</span><span
class="special">,</span><span class="number">10</span><span
class="special">,</span><span class="number">3</span><span
class="special">,</span><span class="number">10</span><span
class="special">,</span><span class="number">5</span><span
class="special">,</span><span class="number">10</span><span
class="special">,</span><span class="number">7</span><span
class="special">,</span><span class="number">10</span><span
class="special">,</span><span class="number">9</span>
</pre>
=======================================
---
/trunk/libs/range/doc/html/range/reference/adaptors/reference/reversed.html
Mon May 31 00:54:22 2010
+++
/trunk/libs/range/doc/html/range/reference/adaptors/reference/reversed.html
Tue Jun 22 21:13:43 2010
@@ -3,9 +3,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>reversed</title>
<link rel="stylesheet"
href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../../../index.html"
title="Chapter 1. Range 2.0">
-<link rel="up" href="../reference.html" title="Reference">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../reference.html" title="Reference
参考手册">
<link rel="prev" href="replaced_if.html" title="replaced_if">
<link rel="next" href="sliced.html" title="sliced">
</head>
@@ -22,12 +22,12 @@
<div class="spirit-nav">
<a accesskey="p" href="replaced_if.html"><img
src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../reference.html"><img
src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../../index.html"><img
src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="sliced.html"><img
src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="reversed">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="range.reference.adaptors.reference.reversed"></a><a class="link"
href="reversed.html" title="reversed"> reversed</a>
</h5></div></div></div>
<div class="toc"><dl><dt><span class="section"><a
href="reversed.html#range.reference.adaptors.reference.reversed.reversed_example">
- reversed example</a></span></dt></dl></div>
+ reversed example 示例</a></span></dt></dl></div>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -36,12 +36,12 @@
<thead><tr>
<th>
<p>
- Syntax
+ Syntax 语法
</p>
</th>
<th>
<p>
- Code
+ Code 代码
</p>
</th>
</tr></thead>
@@ -49,7 +49,7 @@
<tr>
<td>
<p>
- Pipe
+ Pipe 通道式
</p>
</td>
<td>
@@ -62,7 +62,7 @@
<tr>
<td>
<p>
- Function
+ Function 函数式
</p>
</td>
<td>
@@ -73,24 +73,25 @@
</tr>
</tbody>
</table></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
<span class="bold"><strong>Returns:</strong></span> A range whose
iterators behave
- as if they were the original iterators wrapped in <code
class="computeroutput"><span
class="identifier">reverse_iterator</span></code>.
+ as if they were the original iterators wrapped in <code
class="computeroutput"><span
class="identifier">reverse_iterator</span></code>.<br><span
class="bold"><strong>返回:</strong></span>
一个区间,其迭代器的行为就象包装在
+ <code class="computeroutput"><span
class="identifier">reverse_iterator</span></code>
中的原迭代器一样。
</li>
-<li class="listitem">
-<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/bidirectional_range.html" title="Bidirectional
Range">Bidirectional
- Range</a>
+<li>
+<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/bidirectional_range.html" title="Bidirectional
Range 双向区间">Bidirectional
+ Range</a><br><span
class="bold"><strong>区间类别:</strong></span><a
class="link" href="../../../concepts/bidirectional_range.html"
title="Bidirectional Range 双向区间">Bidirectional
Range</a>
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Returned Range Category:</strong></span> The
range
- category of <code class="computeroutput"><span
class="identifier">rng</span></code>.
+ category of <code class="computeroutput"><span
class="identifier">rng</span></code>.<br><span
class="bold"><strong>返回区间类别:</strong></span><code
class="computeroutput"><span class="identifier">rng</span></code>
的区间类别。
</li>
</ul></div>
-<div class="section" title="reversed example">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a
name="range.reference.adaptors.reference.reversed.reversed_example"></a><a
class="link"
href="reversed.html#range.reference.adaptors.reference.reversed.reversed_example"
title="reversed example">
- reversed example</a>
+<a
name="range.reference.adaptors.reference.reversed.reversed_example"></a><a
class="link"
href="reversed.html#range.reference.adaptors.reference.reversed.reversed_example"
title="reversed example 示例">
+ reversed example 示例</a>
</h6></div></div></div>
<p>
@@ -121,7 +122,7 @@
</p>
</div>
<p>
- This would produce the output:
+ This would produce the output:<br>
生成以下输出:
</p>
<pre class="programlisting"><span class="number">9</span><span
class="special">,</span><span class="number">8</span><span
class="special">,</span><span class="number">7</span><span
class="special">,</span><span class="number">6</span><span
class="special">,</span><span class="number">5</span><span
class="special">,</span><span class="number">4</span><span
class="special">,</span><span class="number">3</span><span
class="special">,</span><span class="number">2</span><span
class="special">,</span><span class="number">1</span>
</pre>
=======================================
---
/trunk/libs/range/doc/html/range/reference/adaptors/reference/sliced.html
Mon May 31 00:54:22 2010
+++
/trunk/libs/range/doc/html/range/reference/adaptors/reference/sliced.html
Tue Jun 22 21:13:43 2010
@@ -3,9 +3,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>sliced</title>
<link rel="stylesheet"
href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../../../index.html"
title="Chapter 1. Range 2.0">
-<link rel="up" href="../reference.html" title="Reference">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../reference.html" title="Reference
参考手册">
<link rel="prev" href="reversed.html" title="reversed">
<link rel="next" href="strided.html" title="strided">
</head>
@@ -22,12 +22,12 @@
<div class="spirit-nav">
<a accesskey="p" href="reversed.html"><img
src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../reference.html"><img
src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../../index.html"><img
src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="strided.html"><img
src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="sliced">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="range.reference.adaptors.reference.sliced"></a><a class="link"
href="sliced.html" title="sliced"> sliced</a>
</h5></div></div></div>
<div class="toc"><dl><dt><span class="section"><a
href="sliced.html#range.reference.adaptors.reference.sliced.sliced_example">
- sliced example</a></span></dt></dl></div>
+ sliced example 示例</a></span></dt></dl></div>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -36,12 +36,12 @@
<thead><tr>
<th>
<p>
- Syntax
+ Syntax 语法
</p>
</th>
<th>
<p>
- Code
+ Code 代码
</p>
</th>
</tr></thead>
@@ -49,7 +49,7 @@
<tr>
<td>
<p>
- Pipe
+ Pipe 通道式
</p>
</td>
<td>
@@ -63,7 +63,7 @@
<tr>
<td>
<p>
- Function
+ Function 函数式
</p>
</td>
<td>
@@ -76,31 +76,36 @@
</tr>
</tbody>
</table></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
<span class="bold"><strong>Precondition:</strong></span><code
class="computeroutput"><span class="number">0</span>
<span class="special"><=</span> <span
class="identifier">n</span>
<span class="special">&&</span> <span
class="identifier">n</span>
<span class="special"><=</span> <span
class="identifier">m</span>
<span class="special">&&</span> <span
class="identifier">m</span>
- <span class="special"><</span> <span
class="identifier">distance</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">)</span></code>
+ <span class="special"><</span> <span
class="identifier">distance</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">)</span></code><br><span
class="bold"><strong>前提条件:</strong></span><code
class="computeroutput"><span class="number">0</span> <span
class="special"><=</span>
+ <span class="identifier">n</span> <span
class="special">&&</span>
+ <span class="identifier">n</span> <span
class="special"><=</span>
+ <span class="identifier">m</span> <span
class="special">&&</span>
+ <span class="identifier">m</span> <span
class="special"><</span>
+ <span class="identifier">distance</span><span
class="special">(</span><span class="identifier">rng</span><span
class="special">)</span></code>
</li>
-<li class="listitem">
-<span class="bold"><strong>Returns:</strong></span><code
class="computeroutput"><span class="identifier">make_range</span><span
class="special">(</span><span class="identifier">rng</span><span
class="special">,</span> <span class="identifier">n</span><span
class="special">,</span> <span class="identifier">m</span><span
class="special">)</span></code>
+<li>
+<span class="bold"><strong>Returns:</strong></span><code
class="computeroutput"><span class="identifier">make_range</span><span
class="special">(</span><span class="identifier">rng</span><span
class="special">,</span> <span class="identifier">n</span><span
class="special">,</span> <span class="identifier">m</span><span
class="special">)</span></code><br><span
class="bold"><strong>返回:</strong></span><code
class="computeroutput"><span class="identifier">make_range</span><span
class="special">(</span><span class="identifier">rng</span><span
class="special">,</span> <span class="identifier">n</span><span
class="special">,</span> <span class="identifier">m</span><span
class="special">)</span></code>
</li>
-<li class="listitem">
-<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/random_access_range.html" title="Random Access
Range">Random
- Access Range</a>
+<li>
+<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/random_access_range.html" title="Random Access
Range 随机访问区间">Random
+ Access Range</a><br><span
class="bold"><strong>区间类别:</strong></span><a
class="link" href="../../../concepts/random_access_range.html"
title="Random Access Range
随机访问区间">Random Access Range</a>
</li>
-<li class="listitem">
-<span class="bold"><strong>Returned Range Category:</strong></span><a
class="link" href="../../../concepts/random_access_range.html"
title="Random Access Range">Random
- Access Range</a>
+<li>
+<span class="bold"><strong>Returned Range Category:</strong></span><a
class="link" href="../../../concepts/random_access_range.html"
title="Random Access Range
随机访问区间">Random
+ Access Range</a><br><span
class="bold"><strong>返回区间类别:</strong></span><a
class="link" href="../../../concepts/random_access_range.html"
title="Random Access Range
随机访问区间">Random Access Range</a>
</li>
</ul></div>
-<div class="section" title="sliced example">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="range.reference.adaptors.reference.sliced.sliced_example"></a><a
class="link"
href="sliced.html#range.reference.adaptors.reference.sliced.sliced_example"
title="sliced example">
- sliced example</a>
+<a name="range.reference.adaptors.reference.sliced.sliced_example"></a><a
class="link"
href="sliced.html#range.reference.adaptors.reference.sliced.sliced_example"
title="sliced example 示例">
+ sliced example 示例</a>
</h6></div></div></div>
<p>
@@ -131,7 +136,7 @@
</p>
</div>
<p>
- This would produce the output:
+ This would produce the output:<br>
生成以下输出:
</p>
<pre class="programlisting"><span class="number">3</span><span
class="special">,</span><span class="number">4</span><span
class="special">,</span><span class="number">5</span>
</pre>
=======================================
---
/trunk/libs/range/doc/html/range/reference/adaptors/reference/strided.html
Mon May 31 00:54:22 2010
+++
/trunk/libs/range/doc/html/range/reference/adaptors/reference/strided.html
Tue Jun 22 21:13:43 2010
@@ -3,9 +3,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>strided</title>
<link rel="stylesheet"
href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../../../index.html"
title="Chapter 1. Range 2.0">
-<link rel="up" href="../reference.html" title="Reference">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../reference.html" title="Reference
参考手册">
<link rel="prev" href="sliced.html" title="sliced">
<link rel="next" href="tokenized.html" title="tokenized">
</head>
@@ -22,12 +22,12 @@
<div class="spirit-nav">
<a accesskey="p" href="sliced.html"><img
src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../reference.html"><img
src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../../index.html"><img
src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="tokenized.html"><img
src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="strided">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="range.reference.adaptors.reference.strided"></a><a class="link"
href="strided.html" title="strided"> strided</a>
</h5></div></div></div>
<div class="toc"><dl><dt><span class="section"><a
href="strided.html#range.reference.adaptors.reference.strided.strided_example">
- strided example</a></span></dt></dl></div>
+ strided example 示例</a></span></dt></dl></div>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -36,12 +36,12 @@
<thead><tr>
<th>
<p>
- Syntax
+ Syntax 语法
</p>
</th>
<th>
<p>
- Code
+ Code 代码
</p>
</th>
</tr></thead>
@@ -49,7 +49,7 @@
<tr>
<td>
<p>
- Pipe
+ Pipe 通道式
</p>
</td>
<td>
@@ -62,7 +62,7 @@
<tr>
<td>
<p>
- Function
+ Function 函数式
</p>
</td>
<td>
@@ -74,30 +74,34 @@
</tr>
</tbody>
</table></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
<span class="bold"><strong>Precondition:</strong></span><code
class="computeroutput"><span class="number">0</span>
<span class="special"><=</span> <span
class="identifier">n</span>
<span class="special">&&</span> <span
class="identifier">n</span>
- <span class="special"><</span> <span
class="identifier">distance</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">)</span></code>
+ <span class="special"><</span> <span
class="identifier">distance</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">)</span></code><br><span
class="bold"><strong>前提条件:</strong></span><code
class="computeroutput"><span class="number">0</span> <span
class="special"><=</span>
+ <span class="identifier">n</span> <span
class="special">&&</span>
+ <span class="identifier">n</span> <span
class="special"><</span>
+ <span class="identifier">distance</span><span
class="special">(</span><span class="identifier">rng</span><span
class="special">)</span></code>
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Returns:</strong></span> A new range based on
<code class="computeroutput"><span class="identifier">rng</span></code>
where traversal is performed
- in steps of <code class="computeroutput"><span
class="identifier">n</span></code>.
+ in steps of <code class="computeroutput"><span
class="identifier">n</span></code>.<br><span
class="bold"><strong>返回:</strong></span>
一个基于 <code class="computeroutput"><span
class="identifier">rng</span></code>
的新区间,其遍历以
+ <code class="computeroutput"><span
class="identifier">n</span></code> 步执行。
</li>
-<li class="listitem">
-<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/random_access_range.html" title="Random Access
Range">Random
- Access Range</a>
+<li>
+<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/random_access_range.html" title="Random Access
Range 随机访问区间">Random
+ Access Range</a><br><span
class="bold"><strong>区间类别:</strong></span><a
class="link" href="../../../concepts/random_access_range.html"
title="Random Access Range
随机访问区间">Random Access Range</a>
</li>
-<li class="listitem">
-<span class="bold"><strong>Returned Range Category:</strong></span><a
class="link" href="../../../concepts/random_access_range.html"
title="Random Access Range">Random
- Access Range</a>
+<li>
+<span class="bold"><strong>Returned Range Category:</strong></span><a
class="link" href="../../../concepts/random_access_range.html"
title="Random Access Range
随机访问区间">Random
+ Access Range</a><br><span
class="bold"><strong>返回区间类别:</strong></span><a
class="link" href="../../../concepts/random_access_range.html"
title="Random Access Range
随机访问区间">Random Access Range</a>
</li>
</ul></div>
-<div class="section" title="strided example">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a
name="range.reference.adaptors.reference.strided.strided_example"></a><a
class="link"
href="strided.html#range.reference.adaptors.reference.strided.strided_example"
title="strided example">
- strided example</a>
+<a
name="range.reference.adaptors.reference.strided.strided_example"></a><a
class="link"
href="strided.html#range.reference.adaptors.reference.strided.strided_example"
title="strided example 示例">
+ strided example 示例</a>
</h6></div></div></div>
<p>
@@ -128,7 +132,7 @@
</p>
</div>
<p>
- This would produce the output:
+ This would produce the output:<br>
生成以下输出:
</p>
<pre class="programlisting"><span class="number">1</span><span
class="special">,</span><span class="number">3</span><span
class="special">,</span><span class="number">5</span><span
class="special">,</span><span class="number">7</span><span
class="special">,</span><span class="number">9</span>
</pre>
=======================================
---
/trunk/libs/range/doc/html/range/reference/adaptors/reference/tokenized.html
Mon May 31 00:54:22 2010
+++
/trunk/libs/range/doc/html/range/reference/adaptors/reference/tokenized.html
Tue Jun 22 21:13:43 2010
@@ -3,9 +3,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>tokenized</title>
<link rel="stylesheet"
href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../../../index.html"
title="Chapter 1. Range 2.0">
-<link rel="up" href="../reference.html" title="Reference">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../reference.html" title="Reference
参考手册">
<link rel="prev" href="strided.html" title="strided">
<link rel="next" href="transformed.html" title="transformed">
</head>
@@ -22,7 +22,7 @@
<div class="spirit-nav">
<a accesskey="p" href="strided.html"><img
src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../reference.html"><img
src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../../index.html"><img
src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="transformed.html"><img
src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="tokenized">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="range.reference.adaptors.reference.tokenized"></a><a class="link"
href="tokenized.html" title="tokenized"> tokenized</a>
</h5></div></div></div>
@@ -34,12 +34,12 @@
<thead><tr>
<th>
<p>
- Syntax
+ Syntax 语法
</p>
</th>
<th>
<p>
- Code
+ Code 代码
</p>
</th>
</tr></thead>
@@ -47,7 +47,7 @@
<tr>
<td>
<p>
- Pipe
+ Pipe 通道式
</p>
</td>
<td>
@@ -67,7 +67,7 @@
<tr>
<td>
<p>
- Function
+ Function 函数式
</p>
</td>
<td>
@@ -86,48 +86,62 @@
</tr>
</tbody>
</table></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
-<span class="bold"><strong>Precondition:</strong></span><div
class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="bold"><strong>Precondition:</strong></span><br><span
class="bold"><strong>前提条件:</strong></span><div
class="itemizedlist"><ul type="circle">
+<li>
Let <code class="computeroutput"><span
class="identifier">T</span></code> denote <code
class="computeroutput"><span class="keyword">typename</span> <span
class="identifier">range_value</span><span class="special"><</span><span
class="identifier">decltype</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">)>::</span><span
class="identifier">type</span></code>,
then <code class="computeroutput"><span
class="identifier">regex</span></code> has
the type <code class="computeroutput"><span
class="identifier">basic_regex</span><span class="special"><</span><span
class="identifier">T</span><span class="special">></span></code> or is
implicitly convertible
- to one of these types.
+ to one of these types.<br> 令 <code
class="computeroutput"><span class="identifier">T</span></code>
+ 表示 <code class="computeroutput"><span
class="keyword">typename</span> <span
class="identifier">range_value</span><span class="special"><</span><span
class="identifier">decltype</span><span class="special">(</span><span
class="identifier">rng</span><span class="special">)>::</span><span
class="identifier">type</span></code>,则
+ <code class="computeroutput"><span
class="identifier">regex</span></code> 类型为
+ <code class="computeroutput"><span
class="identifier">basic_regex</span><span class="special"><</span><span
class="identifier">T</span><span class="special">></span></code>
+
或可隐式转换为这些类型之一。
</li>
-<li class="listitem">
+<li>
<code class="computeroutput"><span class="identifier">i</span></code> has
the type
- <code class="computeroutput"><span
class="keyword">int</span></code>.
+ <code class="computeroutput"><span
class="keyword">int</span></code>.<br><code class="computeroutput"><span
class="identifier">i</span></code> 类型为 <code
class="computeroutput"><span class="keyword">int</span></code>.
</li>
-<li class="listitem">
+<li>
the <code class="computeroutput"><span
class="identifier">value_type</span></code>
- of <code class="computeroutput"><span
class="identifier">rndRng</span></code> is <code
class="computeroutput"><span class="keyword">int</span></code>.
+ of <code class="computeroutput"><span
class="identifier">rndRng</span></code> is <code
class="computeroutput"><span class="keyword">int</span></code>.<br><code
class="computeroutput"><span class="identifier">rndRng</span></code>
+ 的 <code class="computeroutput"><span
class="identifier">value_type</span></code>
+ 为 <code class="computeroutput"><span
class="keyword">int</span></code>.
</li>
-<li class="listitem">
+<li>
<code class="computeroutput"><span class="identifier">flags</span></code>
has the type
+ <code class="computeroutput"><span
class="identifier">regex_constants</span><span
class="special">::</span><span
class="identifier">syntax_option_type</span></code>.<br><code
class="computeroutput"><span class="identifier">flags</span></code>
具有类型
<code class="computeroutput"><span
class="identifier">regex_constants</span><span
class="special">::</span><span
class="identifier">syntax_option_type</span></code>.
</li>
</ul></div>
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Returns:</strong></span> A range whose
iterators behave
as if they were the original iterators wrapped in <code
class="computeroutput"><span
class="identifier">regex_token_iterator</span></code>.
The first iterator in the range would be constructed by
forwarding
all the arguments of <code class="computeroutput"><span
class="identifier">tokenized</span><span class="special">()</span></code>
to the <code class="computeroutput"><span
class="identifier">regex_token_iterator</span></code>
- constructor.
+ constructor.<br><span
class="bold"><strong>返回:</strong></span>
一个区间,其迭代器的行为就象包装在
+ <code class="computeroutput"><span
class="identifier">regex_token_iterator</span></code>
+
中的原迭代器一样。区间中的第一个迭代器通过前转
+ <code class="computeroutput"><span
class="identifier">tokenized</span><span class="special">()</span></code>
+ 的所有参数至 <code
class="computeroutput"><span
class="identifier">regex_token_iterator</span></code>
+
构造函数来构造。
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Throws:</strong></span> Whatever constructing
and
copying equivalent <code class="computeroutput"><span
class="identifier">regex_token_iterator</span></code>s
- might throw.
+ might throw.<br><span
class="bold"><strong>抛出:</strong></span>
构造和复制等效的
+ <code class="computeroutput"><span
class="identifier">regex_token_iterator</span></code>
+
时可能抛出的任何异常。
</li>
-<li class="listitem">
-<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/random_access_range.html" title="Random Access
Range">Random
- Access Range</a>
+<li>
+<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/random_access_range.html" title="Random Access
Range 随机访问区间">Random
+ Access Range</a><br><span
class="bold"><strong>区间类别:</strong></span><a
class="link" href="../../../concepts/random_access_range.html"
title="Random Access Range
随机访问区间">Random Access Range</a>
</li>
-<li class="listitem">
-<span class="bold"><strong>Returned Range Category:</strong></span><a
class="link" href="../../../concepts/random_access_range.html"
title="Random Access Range">Random
- Access Range</a>
+<li>
+<span class="bold"><strong>Returned Range Category:</strong></span><a
class="link" href="../../../concepts/random_access_range.html"
title="Random Access Range
随机访问区间">Random
+ Access Range</a><br><span
class="bold"><strong>返回区间类别:</strong></span><a
class="link" href="../../../concepts/random_access_range.html"
title="Random Access Range
随机访问区间">Random Access Range</a>
</li>
</ul></div>
</div>
=======================================
---
/trunk/libs/range/doc/html/range/reference/adaptors/reference/transformed.html
Mon May 31 00:54:22 2010
+++
/trunk/libs/range/doc/html/range/reference/adaptors/reference/transformed.html
Tue Jun 22 21:13:43 2010
@@ -3,9 +3,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>transformed</title>
<link rel="stylesheet"
href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../../../index.html"
title="Chapter 1. Range 2.0">
-<link rel="up" href="../reference.html" title="Reference">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../reference.html" title="Reference
参考手册">
<link rel="prev" href="tokenized.html" title="tokenized">
<link rel="next" href="uniqued.html" title="uniqued">
</head>
@@ -22,13 +22,13 @@
<div class="spirit-nav">
<a accesskey="p" href="tokenized.html"><img
src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../reference.html"><img
src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../../index.html"><img
src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="uniqued.html"><img
src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="transformed">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="range.reference.adaptors.reference.transformed"></a><a
class="link" href="transformed.html" title="transformed">
transformed</a>
</h5></div></div></div>
<div class="toc"><dl><dt><span class="section"><a
href="transformed.html#range.reference.adaptors.reference.transformed.transformed_example">
- transformed example</a></span></dt></dl></div>
+ transformed example 示例</a></span></dt></dl></div>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -37,12 +37,12 @@
<thead><tr>
<th>
<p>
- Syntax
+ Syntax 语法
</p>
</th>
<th>
<p>
- Code
+ Code 代码
</p>
</th>
</tr></thead>
@@ -50,7 +50,7 @@
<tr>
<td>
<p>
- Pipe
+ Pipe 通道式
</p>
</td>
<td>
@@ -63,7 +63,7 @@
<tr>
<td>
<p>
- Function
+ Function 函数式
</p>
</td>
<td>
@@ -75,33 +75,36 @@
</tr>
</tbody>
</table></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
<span class="bold"><strong>Precondition:</strong></span> The <code
class="computeroutput"><span class="identifier">value_type</span></code>
- of the range is convertible to the argument type of <code
class="computeroutput"><span class="identifier">fun</span></code>.
+ of the range is convertible to the argument type of <code
class="computeroutput"><span class="identifier">fun</span></code>.<br><span
class="bold"><strong>前提条件:</strong></span>
区间的 <code class="computeroutput"><span
class="identifier">value_type</span></code>
可转换为 <code class="computeroutput"><span
class="identifier">fun</span></code>
的参数类型。
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Postcondition:</strong></span> For all elements
<code class="computeroutput"><span class="identifier">x</span></code> in
the returned range, <code class="computeroutput"><span
class="identifier">x</span></code> is the result of <code
class="computeroutput"><span class="identifier">fun</span><span
class="special">(</span><span class="identifier">y</span><span
class="special">)</span></code>
where <code class="computeroutput"><span
class="identifier">y</span></code> is the corresponding
- element in the original range.
+ element in the original range.<br><span
class="bold"><strong>后验条件:</strong></span>
+
对于返回区间中的所有元素
<code class="computeroutput"><span
class="identifier">x</span></code>,<code
class="computeroutput"><span class="identifier">x</span></code> 为
<code class="computeroutput"><span class="identifier">fun</span><span
class="special">(</span><span class="identifier">y</span><span
class="special">)</span></code>
的结果,其中 <code
class="computeroutput"><span class="identifier">y</span></code>
+
为原区间中的对应元素。
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Throws:</strong></span> Whatever the
copy-constructor
- of <code class="computeroutput"><span
class="identifier">fun</span></code> might throw.
+ of <code class="computeroutput"><span
class="identifier">fun</span></code> might throw.<br><span
class="bold"><strong>抛出:</strong></span><code
class="computeroutput"><span class="identifier">fun</span></code>
+
的复制构造函数所抛出的任何异常。
</li>
-<li class="listitem">
-<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/single_pass_range.html" title="Single Pass
Range">Single
- Pass Range</a>
+<li>
+<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/single_pass_range.html" title="Single Pass Range
单遍区间">Single
+ Pass Range</a><br><span
class="bold"><strong>区间类别:</strong></span><a
class="link" href="../../../concepts/single_pass_range.html" title="Single
Pass Range 单遍区间">Single Pass Range</a>
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Returned Range Category:</strong></span> The
range
- category of <code class="computeroutput"><span
class="identifier">rng</span></code>.
+ category of <code class="computeroutput"><span
class="identifier">rng</span></code>.<br><span
class="bold"><strong>返回区间类别:</strong></span><code
class="computeroutput"><span class="identifier">rng</span></code>
的区间类别。
</li>
</ul></div>
-<div class="section" title="transformed example">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a
name="range.reference.adaptors.reference.transformed.transformed_example"></a><a
class="link"
href="transformed.html#range.reference.adaptors.reference.transformed.transformed_example"
title="transformed example">
- transformed example</a>
+<a
name="range.reference.adaptors.reference.transformed.transformed_example"></a><a
class="link"
href="transformed.html#range.reference.adaptors.reference.transformed.transformed_example"
title="transformed example 示例">
+ transformed example 示例</a>
</h6></div></div></div>
<p>
@@ -138,7 +141,7 @@
</p>
</div>
<p>
- This would produce the output:
+ This would produce the output:<br>
生成以下输出:
</p>
<pre class="programlisting"><span class="number">2</span><span
class="special">,</span><span class="number">4</span><span
class="special">,</span><span class="number">6</span><span
class="special">,</span><span class="number">8</span><span
class="special">,</span><span class="number">10</span><span
class="special">,</span><span class="number">12</span><span
class="special">,</span><span class="number">14</span><span
class="special">,</span><span class="number">16</span><span
class="special">,</span><span class="number">18</span><span
class="special">,</span><span class="number">20</span>
</pre>
=======================================
---
/trunk/libs/range/doc/html/range/reference/adaptors/reference/uniqued.html
Mon May 31 00:54:22 2010
+++
/trunk/libs/range/doc/html/range/reference/adaptors/reference/uniqued.html
Tue Jun 22 21:13:43 2010
@@ -3,11 +3,11 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>uniqued</title>
<link rel="stylesheet"
href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-<link rel="home" href="../../../../index.html"
title="Chapter 1. Range 2.0">
-<link rel="up" href="../reference.html" title="Reference">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../../../index.html"
title="Chapter 1. Range 2.0">
+<link rel="up" href="../reference.html" title="Reference
参考手册">
<link rel="prev" href="transformed.html" title="transformed">
-<link rel="next" href="../../algorithms.html" title="Range Algorithm">
+<link rel="next" href="../../algorithms.html" title="Range Algorithm
区间算法">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,12 +22,12 @@
<div class="spirit-nav">
<a accesskey="p" href="transformed.html"><img
src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a
accesskey="u" href="../reference.html"><img
src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a
accesskey="h" href="../../../../index.html"><img
src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a
accesskey="n" href="../../algorithms.html"><img
src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="uniqued">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="range.reference.adaptors.reference.uniqued"></a><a class="link"
href="uniqued.html" title="uniqued"> uniqued</a>
</h5></div></div></div>
<div class="toc"><dl><dt><span class="section"><a
href="uniqued.html#range.reference.adaptors.reference.uniqued.uniqued_example">
- uniqued example</a></span></dt></dl></div>
+ uniqued example 示例</a></span></dt></dl></div>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -36,12 +36,12 @@
<thead><tr>
<th>
<p>
- Syntax
+ Syntax 语法
</p>
</th>
<th>
<p>
- Code
+ Code 代码
</p>
</th>
</tr></thead>
@@ -49,7 +49,7 @@
<tr>
<td>
<p>
- Pipe
+ Pipe 通道式
</p>
</td>
<td>
@@ -62,7 +62,7 @@
<tr>
<td>
<p>
- Function
+ Function 函数式
</p>
</td>
<td>
@@ -73,29 +73,34 @@
</tr>
</tbody>
</table></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
+<div class="itemizedlist"><ul type="disc">
+<li>
<span class="bold"><strong>Precondition:</strong></span> The <code
class="computeroutput"><span class="identifier">value_type</span></code>
- of the range is comparable with <code
class="computeroutput"><span class="keyword">operator</span><span
class="special">==()</span></code>.
+ of the range is comparable with <code
class="computeroutput"><span class="keyword">operator</span><span
class="special">==()</span></code>.<br><span
class="bold"><strong>前提条件:</strong></span>
+ 区间的 <code class="computeroutput"><span
class="identifier">value_type</span></code>
+ 可以用 <code class="computeroutput"><span
class="keyword">operator</span><span class="special">==()</span></code>
+ 进行比较。
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Postcondition:</strong></span> For all adjacent
elements
- <code class="computeroutput"><span
class="special">[</span><span class="identifier">x</span><span
class="special">,</span><span class="identifier">y</span><span
class="special">]</span></code> in the returned range, <code
class="computeroutput"><span class="identifier">x</span><span
class="special">==</span><span class="identifier">y</span></code> is false.
+ <code class="computeroutput"><span
class="special">[</span><span class="identifier">x</span><span
class="special">,</span><span class="identifier">y</span><span
class="special">]</span></code> in the returned range, <code
class="computeroutput"><span class="identifier">x</span><span
class="special">==</span><span class="identifier">y</span></code> is
false.<br><span
class="bold"><strong>后验条件:</strong></span>
+
对于返回区间中的所有相邻元素
<code class="computeroutput"><span class="special">[</span><span
class="identifier">x</span><span class="special">,</span><span
class="identifier">y</span><span
class="special">]</span></code>,<code class="computeroutput"><span
class="identifier">x</span><span class="special">==</span><span
class="identifier">y</span></code> 为 false。
</li>
-<li class="listitem">
-<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/forward_range.html" title="Forward Range">Forward
- Range</a>
+<li>
+<span class="bold"><strong>Range Category:</strong></span><a class="link"
href="../../../concepts/forward_range.html" title="Forward Range
前向区间">Forward
+ Range</a><br><span
class="bold"><strong>区间类别:</strong></span><a
class="link" href="../../../concepts/forward_range.html" title="Forward
Range 前向区间">Forward Range</a>
</li>
-<li class="listitem">
+<li>
<span class="bold"><strong>Returned Range Category:</strong></span> The
minimum
of the range concept of <code class="computeroutput"><span
class="identifier">rng</span></code>
- and <a class="link"
href="../../../concepts/forward_range.html" title="Forward Range">Forward
Range</a>.
+ and <a class="link"
href="../../../concepts/forward_range.html" title="Forward Range
前向区间">Forward Range</a>.<br><span
class="bold"><strong>返回区间类别:</strong></span><code
class="computeroutput"><span class="identifier">rng</span></code> 和
<a class="link" href="../../../concepts/forward_range.html" title="Forward
Range 前向区间">Forward
+ Range</a>
的最小区间类别。
</li>
</ul></div>
-<div class="section" title="uniqued example">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a
name="range.reference.adaptors.reference.uniqued.uniqued_example"></a><a
class="link"
href="uniqued.html#range.reference.adaptors.reference.uniqued.uniqued_example"
title="uniqued example">
- uniqued example</a>
+<a
name="range.reference.adaptors.reference.uniqued.uniqued_example"></a><a
class="link"
href="uniqued.html#range.reference.adaptors.reference.uniqued.uniqued_example"
title="uniqued example 示例">
+ uniqued example 示例</a>
</h6></div></div></div>
<p>
@@ -124,7 +129,7 @@
</p>
</div>
<p>
- This would produce the output:
+ This would produce the output:<br>
生成以下输出:
</p>
<pre class="programlisting"><span class="number">1</span><span
class="special">,</span><span class="number">2</span><span
class="special">,</span><span class="number">3</span><span
class="special">,</span><span class="number">4</span><span
class="special">,</span><span class="number">5</span><span
class="special">,</span><span class="number">6</span>
</pre>
=======================================
***Additional files exist in this changeset.***
Other related posts:
- » [boost-doc-zh] r414 committed - 翻译 range 库的 qbk 文件并生成 html 目录 - boost-doc-zh