Squashed 'third_party/boostorg/iterator/' content from commit b2adecb

Change-Id: I284a73816f9cc846742923879275b84c6e0c915c
git-subtree-dir: third_party/boostorg/iterator
git-subtree-split: b2adecb951af025698618f19a3c838bd314966dc
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..3e84d7c
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,96 @@
+* text=auto !eol svneol=native#text/plain
+*.gitattributes text svneol=native#text/plain
+
+# Scriptish formats
+*.bat        text svneol=native#text/plain
+*.bsh        text svneol=native#text/x-beanshell
+*.cgi        text svneol=native#text/plain
+*.cmd        text svneol=native#text/plain
+*.js         text svneol=native#text/javascript
+*.php        text svneol=native#text/x-php
+*.pl         text svneol=native#text/x-perl
+*.pm         text svneol=native#text/x-perl
+*.py         text svneol=native#text/x-python
+*.sh         eol=lf svneol=LF#text/x-sh
+configure    eol=lf svneol=LF#text/x-sh
+
+# Image formats
+*.bmp        binary svneol=unset#image/bmp
+*.gif        binary svneol=unset#image/gif
+*.ico        binary svneol=unset#image/ico
+*.jpeg       binary svneol=unset#image/jpeg
+*.jpg        binary svneol=unset#image/jpeg
+*.png        binary svneol=unset#image/png
+*.tif        binary svneol=unset#image/tiff
+*.tiff       binary svneol=unset#image/tiff
+*.svg        text svneol=native#image/svg%2Bxml
+
+# Data formats
+*.pdf        binary svneol=unset#application/pdf
+*.avi        binary svneol=unset#video/avi
+*.doc        binary svneol=unset#application/msword
+*.dsp        text svneol=crlf#text/plain
+*.dsw        text svneol=crlf#text/plain
+*.eps        binary svneol=unset#application/postscript
+*.gz         binary svneol=unset#application/gzip
+*.mov        binary svneol=unset#video/quicktime
+*.mp3        binary svneol=unset#audio/mpeg
+*.ppt        binary svneol=unset#application/vnd.ms-powerpoint
+*.ps         binary svneol=unset#application/postscript
+*.psd        binary svneol=unset#application/photoshop
+*.rdf        binary svneol=unset#text/rdf
+*.rss        text svneol=unset#text/xml
+*.rtf        binary svneol=unset#text/rtf
+*.sln        text svneol=native#text/plain
+*.swf        binary svneol=unset#application/x-shockwave-flash
+*.tgz        binary svneol=unset#application/gzip
+*.vcproj     text svneol=native#text/xml
+*.vcxproj    text svneol=native#text/xml
+*.vsprops    text svneol=native#text/xml
+*.wav        binary svneol=unset#audio/wav
+*.xls        binary svneol=unset#application/vnd.ms-excel
+*.zip        binary svneol=unset#application/zip
+
+# Text formats
+.htaccess    text svneol=native#text/plain
+*.bbk        text svneol=native#text/xml
+*.cmake      text svneol=native#text/plain
+*.css        text svneol=native#text/css
+*.dtd        text svneol=native#text/xml
+*.htm        text svneol=native#text/html
+*.html       text svneol=native#text/html
+*.ini        text svneol=native#text/plain
+*.log        text svneol=native#text/plain
+*.mak        text svneol=native#text/plain
+*.qbk        text svneol=native#text/plain
+*.rst        text svneol=native#text/plain
+*.sql        text svneol=native#text/x-sql
+*.txt        text svneol=native#text/plain
+*.xhtml      text svneol=native#text/xhtml%2Bxml
+*.xml        text svneol=native#text/xml
+*.xsd        text svneol=native#text/xml
+*.xsl        text svneol=native#text/xml
+*.xslt       text svneol=native#text/xml
+*.xul        text svneol=native#text/xul
+*.yml        text svneol=native#text/plain
+boost-no-inspect text svneol=native#text/plain
+CHANGES      text svneol=native#text/plain
+COPYING      text svneol=native#text/plain
+INSTALL      text svneol=native#text/plain
+Jamfile      text svneol=native#text/plain
+Jamroot      text svneol=native#text/plain
+Jamfile.v2   text svneol=native#text/plain
+Jamrules     text svneol=native#text/plain
+Makefile*    text svneol=native#text/plain
+README       text svneol=native#text/plain
+TODO         text svneol=native#text/plain
+
+# Code formats
+*.c          text svneol=native#text/plain
+*.cpp        text svneol=native#text/plain
+*.h          text svneol=native#text/plain
+*.hpp        text svneol=native#text/plain
+*.ipp        text svneol=native#text/plain
+*.tpp        text svneol=native#text/plain
+*.jam        text svneol=native#text/plain
+*.java       text svneol=native#text/plain
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..c0e97f1
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,87 @@
+# Copyright 2016, 2017 Peter Dimov
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
+
+language: cpp
+
+sudo: false
+
+python: "2.7"
+
+branches:
+  only:
+    - master
+    - develop
+    - /feature\/.*/
+
+env:
+  matrix:
+    - BOGUS_JOB=true
+
+matrix:
+
+  exclude:
+    - env: BOGUS_JOB=true
+
+  include:
+    - os: linux
+      compiler: g++
+      env: TOOLSET=gcc CXXSTD=03,11
+
+    - os: linux
+      compiler: g++-5
+      env: TOOLSET=gcc-5 CXXSTD=03,11,14,1z
+      addons:
+        apt:
+          packages:
+            - g++-5
+          sources:
+            - ubuntu-toolchain-r-test
+
+    - os: linux
+      compiler: g++-6
+      env: TOOLSET=gcc-6 CXXSTD=03,11,14,1z
+      addons:
+        apt:
+          packages:
+            - g++-6
+          sources:
+            - ubuntu-toolchain-r-test
+
+    - os: linux
+      compiler: g++-7
+      env: TOOLSET=gcc-7 CXXSTD=03,11,14,17
+      addons:
+        apt:
+          packages:
+            - g++-7
+          sources:
+            - ubuntu-toolchain-r-test
+
+    - os: linux
+      compiler: clang++
+      env: TOOLSET=clang CXXSTD=03,11,14,1z
+
+    - os: osx
+      compiler: clang++
+      env: TOOLSET=clang CXXSTD=03,11,14,1z
+
+install:
+  - BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
+  - cd ..
+  - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
+  - cd boost-root
+  - git submodule update --init tools/build
+  - git submodule update --init libs/config
+  - git submodule update --init tools/boostdep
+  - cp -r $TRAVIS_BUILD_DIR/* libs/iterator
+  - python tools/boostdep/depinst/depinst.py iterator
+  - ./bootstrap.sh
+  - ./b2 headers
+
+script:
+  - ./b2 -j3 libs/iterator/test toolset=$TOOLSET cxxstd=$CXXSTD
+
+notifications:
+  email:
+    on_success: always
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..b236d12
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,43 @@
+# Copyright 2017 Edward Diener
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
+
+version: 1.0.{build}-{branch}
+
+shallow_clone: true
+
+branches:
+  only:
+    - master
+    - develop
+    - /feature\/.*/
+
+environment:
+  matrix:
+    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
+      TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0,msvc-12.0
+    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
+      TOOLSET: msvc-14.0
+    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+      TOOLSET: msvc-14.1
+      CXXSTD: 14,17
+
+install:
+  - set BOOST_BRANCH=develop
+  - if "%APPVEYOR_REPO_BRANCH%" == "master" set BOOST_BRANCH=master
+  - cd ..
+  - git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
+  - cd boost-root
+  - git submodule update --init tools/build
+  - git submodule update --init libs/config
+  - git submodule update --init tools/boostdep
+  - xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\iterator
+  - python tools/boostdep/depinst/depinst.py iterator
+  - cmd /c bootstrap
+  - b2 -d0 headers
+
+build: off
+
+test_script:
+  - if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD%
+  - b2 -j3 libs/iterator/test toolset=%TOOLSET% %CXXSTD%
diff --git a/doc/BidirectionalTraversal.html b/doc/BidirectionalTraversal.html
new file mode 100644
index 0000000..9c45f40
--- /dev/null
+++ b/doc/BidirectionalTraversal.html
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
+<title>Bidirectional Traversal Concept</title>
+<link rel="stylesheet" href="../../../rst.css" type="text/css" />
+</head>
+<body>
+<div class="document" id="bidirectional-traversal-concept">
+<h1 class="title">Bidirectional Traversal Concept</h1>
+
+<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
+<!-- Software License, Version 1.0. (See accompanying -->
+<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
+<p>A class or built-in type <tt class="docutils literal"><span class="pre">X</span></tt> models the <em>Bidirectional Traversal</em>
+concept if, in addition to <tt class="docutils literal"><span class="pre">X</span></tt> meeting the requirements of Forward
+Traversal Iterator, the following expressions are valid and respect
+the stated semantics.</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="38%" />
+<col width="37%" />
+<col width="25%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head" colspan="3">Bidirectional Traversal Iterator Requirements (in addition to Forward Traversal
+Iterator)</th>
+</tr>
+<tr><th class="head">Expression</th>
+<th class="head">Return Type</th>
+<th class="head">Assertion/Semantics /
+Pre-/Post-condition</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td><tt class="docutils literal"><span class="pre">--r</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">X&amp;</span></tt></td>
+<td>pre: there exists
+<tt class="docutils literal"><span class="pre">s</span></tt> such that <tt class="docutils literal"><span class="pre">r</span>
+<span class="pre">==</span> <span class="pre">++s</span></tt>.  post:
+<tt class="docutils literal"><span class="pre">s</span></tt> is
+dereferenceable.
+<tt class="docutils literal"><span class="pre">--(++r)</span> <span class="pre">==</span> <span class="pre">r</span></tt>.
+<tt class="docutils literal"><span class="pre">--r</span> <span class="pre">==</span> <span class="pre">--s</span></tt>
+implies <tt class="docutils literal"><span class="pre">r</span> <span class="pre">==</span>
+<span class="pre">s</span></tt>. <tt class="docutils literal"><span class="pre">&amp;r</span> <span class="pre">==</span> <span class="pre">&amp;--r</span></tt>.</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">r--</span></tt></td>
+<td>convertible to <tt class="docutils literal"><span class="pre">const</span> <span class="pre">X&amp;</span></tt></td>
+<td><pre class="first last literal-block">
+{
+  X tmp = r;
+  --r;
+  return tmp;
+}
+</pre>
+</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">iterator_traversal&lt;X&gt;::type</span></tt></td>
+<td>Convertible to
+<tt class="docutils literal"><span class="pre">bidirectional_traversal_tag</span></tt></td>
+<td>&nbsp;</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="footer">
+<hr class="footer" />
+<a class="reference external" href="BidirectionalTraversal.rst">View document source</a>.
+Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
+
+</div>
+</body>
+</html>
diff --git a/doc/BidirectionalTraversal.rst b/doc/BidirectionalTraversal.rst
new file mode 100644
index 0000000..a62b8bd
--- /dev/null
+++ b/doc/BidirectionalTraversal.rst
@@ -0,0 +1,41 @@
+.. Copyright David Abrahams 2006. Distributed under the Boost
+.. Software License, Version 1.0. (See accompanying
+.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+Bidirectional Traversal Concept
+...............................
+
+A class or built-in type ``X`` models the *Bidirectional Traversal*
+concept if, in addition to ``X`` meeting the requirements of Forward
+Traversal Iterator, the following expressions are valid and respect
+the stated semantics.
+
++--------------------------------------------------------------------------------------+
+|Bidirectional Traversal Iterator Requirements (in addition to Forward Traversal       |
+|Iterator)                                                                             |
++--------------------------------+-------------------------------+---------------------+
+|Expression                      |Return Type                    |Assertion/Semantics /|
+|                                |                               |Pre-/Post-condition  |
++================================+===============================+=====================+
+|``--r``                         |``X&``                         |pre: there exists    |
+|                                |                               |``s`` such that ``r  |
+|                                |                               |== ++s``.  post:     |
+|                                |                               |``s`` is             |
+|                                |                               |dereferenceable.     |
+|                                |                               |``--(++r) == r``.    |
+|                                |                               |``--r == --s``       |
+|                                |                               |implies ``r ==       |
+|                                |                               |s``. ``&r == &--r``. |
++--------------------------------+-------------------------------+---------------------+
+|``r--``                         |convertible to ``const X&``    |::                   |
+|                                |                               |                     |
+|                                |                               | {                   |
+|                                |                               |   X tmp = r;        |
+|                                |                               |   --r;              |
+|                                |                               |   return tmp;       |
+|                                |                               | }                   |
++--------------------------------+-------------------------------+---------------------+
+|``iterator_traversal<X>::type`` |Convertible to                 |                     |
+|                                |``bidirectional_traversal_tag``|                     |
+|                                |                               |                     |
++--------------------------------+-------------------------------+---------------------+
diff --git a/doc/ForwardTraversal.html b/doc/ForwardTraversal.html
new file mode 100644
index 0000000..702064d
--- /dev/null
+++ b/doc/ForwardTraversal.html
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
+<title>Forward Traversal Concept</title>
+<link rel="stylesheet" href="../../../rst.css" type="text/css" />
+</head>
+<body>
+<div class="document" id="forward-traversal-concept">
+<h1 class="title">Forward Traversal Concept</h1>
+
+<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
+<!-- Software License, Version 1.0. (See accompanying -->
+<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
+<p>A class or built-in type <tt class="docutils literal"><span class="pre">X</span></tt> models the <em>Forward Traversal</em>
+concept if, in addition to <tt class="docutils literal"><span class="pre">X</span></tt> meeting the requirements of Default
+Constructible and Single Pass Iterator, the following expressions are
+valid and respect the stated semantics.</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="38%" />
+<col width="34%" />
+<col width="27%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head" colspan="3">Forward Traversal Iterator Requirements (in addition to Default Constructible and Single Pass Iterator)</th>
+</tr>
+<tr><th class="head">Expression</th>
+<th class="head">Return Type</th>
+<th class="head">Assertion/Note</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td><tt class="docutils literal"><span class="pre">X</span> <span class="pre">u;</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">X&amp;</span></tt></td>
+<td>note: <tt class="docutils literal"><span class="pre">u</span></tt> may have a
+singular value.</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">++r</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">X&amp;</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">r</span> <span class="pre">==</span> <span class="pre">s</span></tt> and <tt class="docutils literal"><span class="pre">r</span></tt> is
+dereferenceable implies
+<tt class="docutils literal"><span class="pre">++r</span> <span class="pre">==</span> <span class="pre">++s.</span></tt></td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">iterator_traits&lt;X&gt;::difference_type</span></tt></td>
+<td>A signed integral type representing
+the distance between iterators</td>
+<td>&nbsp;</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">iterator_traversal&lt;X&gt;::type</span></tt></td>
+<td>Convertible to
+<tt class="docutils literal"><span class="pre">forward_traversal_tag</span></tt></td>
+<td>&nbsp;</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="footer">
+<hr class="footer" />
+<a class="reference external" href="ForwardTraversal.rst">View document source</a>.
+Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
+
+</div>
+</body>
+</html>
diff --git a/doc/ForwardTraversal.rst b/doc/ForwardTraversal.rst
new file mode 100644
index 0000000..80dd9c7
--- /dev/null
+++ b/doc/ForwardTraversal.rst
@@ -0,0 +1,31 @@
+.. Copyright David Abrahams 2006. Distributed under the Boost
+.. Software License, Version 1.0. (See accompanying
+.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+Forward Traversal Concept
+.........................
+
+A class or built-in type ``X`` models the *Forward Traversal*
+concept if, in addition to ``X`` meeting the requirements of Default
+Constructible and Single Pass Iterator, the following expressions are
+valid and respect the stated semantics.
+
++--------------------------------------------------------------------------------------------------------+
+|Forward Traversal Iterator Requirements (in addition to Default Constructible and Single Pass Iterator) |
++---------------------------------------+-----------------------------------+----------------------------+
+|Expression                             |Return Type                        |Assertion/Note              |
++=======================================+===================================+============================+
+|``X u;``                               |``X&``                             |note: ``u`` may have a      |
+|                                       |                                   |singular value.             |
++---------------------------------------+-----------------------------------+----------------------------+
+|``++r``                                |``X&``                             |``r == s`` and ``r`` is     |
+|                                       |                                   |dereferenceable implies     |
+|                                       |                                   |``++r == ++s.``             |
++---------------------------------------+-----------------------------------+----------------------------+
+|``iterator_traits<X>::difference_type``|A signed integral type representing|                            |
+|                                       |the distance between iterators     |                            |
+|                                       |                                   |                            |
++---------------------------------------+-----------------------------------+----------------------------+
+|``iterator_traversal<X>::type``        |Convertible to                     |                            |
+|                                       |``forward_traversal_tag``          |                            |
++---------------------------------------+-----------------------------------+----------------------------+
diff --git a/doc/GNUmakefile b/doc/GNUmakefile
new file mode 100644
index 0000000..85917f7
--- /dev/null
+++ b/doc/GNUmakefile
@@ -0,0 +1,15 @@
+# Copyright David Abrahams 2004. Distributed under the Boost
+# Software License, Version 1.0. (See accompanying
+# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+ECHO	= /bin/echo
+
+all: 
+	@${ECHO} "<boost-root>/libs/iterator/doc/GNUmakefile should be replaced by"
+	@${ECHO}
+	@${ECHO} "    http://www.boost-consulting.com/writing/GNUmakefile,"
+	@${ECHO}
+	@${ECHO} "before proceeding.  That file is not included in the Boost"
+	@${ECHO} "distribution because it is licensed under the GPL, which violates"
+	@${ECHO} "Boost license requirements."
+
diff --git a/doc/IncrementableIterator.html b/doc/IncrementableIterator.html
new file mode 100644
index 0000000..ae47b99
--- /dev/null
+++ b/doc/IncrementableIterator.html
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
+<title>Incrementable Iterator Concept</title>
+<link rel="stylesheet" href="../../../rst.css" type="text/css" />
+</head>
+<body>
+<div class="document" id="incrementable-iterator-concept">
+<h1 class="title">Incrementable Iterator Concept</h1>
+
+<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
+<!-- Software License, Version 1.0. (See accompanying -->
+<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
+<p>A class or built-in type <tt class="docutils literal"><span class="pre">X</span></tt> models the <em>Incrementable Iterator</em>
+concept if, in addition to <tt class="docutils literal"><span class="pre">X</span></tt> being Assignable and Copy
+Constructible, the following expressions are valid and respect the
+stated semantics.</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="39%" />
+<col width="37%" />
+<col width="24%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head" colspan="3">Incrementable Iterator Requirements (in addition to Assignable, Copy Constructible)</th>
+</tr>
+<tr><th class="head">Expression</th>
+<th class="head">Return Type</th>
+<th class="head">Assertion/Semantics</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td><tt class="docutils literal"><span class="pre">++r</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">X&amp;</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">&amp;r</span> <span class="pre">==</span> <span class="pre">&amp;++r</span></tt></td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">r++</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">X</span></tt></td>
+<td><pre class="first last literal-block">
+{
+   X tmp = r;
+   ++r;
+   return tmp;
+}
+</pre>
+</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">iterator_traversal&lt;X&gt;::type</span></tt></td>
+<td>Convertible to
+<tt class="docutils literal"><span class="pre">incrementable_traversal_tag</span></tt></td>
+<td>&nbsp;</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="footer">
+<hr class="footer" />
+<a class="reference external" href="IncrementableIterator.rst">View document source</a>.
+Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
+
+</div>
+</body>
+</html>
diff --git a/doc/IncrementableIterator.rst b/doc/IncrementableIterator.rst
new file mode 100644
index 0000000..a1f92ec
--- /dev/null
+++ b/doc/IncrementableIterator.rst
@@ -0,0 +1,32 @@
+.. Copyright David Abrahams 2006. Distributed under the Boost
+.. Software License, Version 1.0. (See accompanying
+.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+Incrementable Iterator Concept
+..............................
+
+A class or built-in type ``X`` models the *Incrementable Iterator*
+concept if, in addition to ``X`` being Assignable and Copy
+Constructible, the following expressions are valid and respect the
+stated semantics.
+
+
++-------------------------------------------------------------------------------------+
+|Incrementable Iterator Requirements (in addition to Assignable, Copy Constructible)  |
+|                                                                                     |
++--------------------------------+-------------------------------+--------------------+
+|Expression                      |Return Type                    |Assertion/Semantics |
++================================+===============================+====================+
+|``++r``                         |``X&``                         |``&r == &++r``      |
++--------------------------------+-------------------------------+--------------------+
+|``r++``                         |``X``                          |::                  |
+|                                |                               |                    |
+|                                |                               | {                  |
+|                                |                               |    X tmp = r;      |
+|                                |                               |    ++r;            |
+|                                |                               |    return tmp;     |
+|                                |                               | }                  |
++--------------------------------+-------------------------------+--------------------+
+|``iterator_traversal<X>::type`` |Convertible to                 |                    |
+|                                |``incrementable_traversal_tag``|                    |
++--------------------------------+-------------------------------+--------------------+
diff --git a/doc/InteroperableIterator.rst b/doc/InteroperableIterator.rst
new file mode 100644
index 0000000..3632ff2
--- /dev/null
+++ b/doc/InteroperableIterator.rst
@@ -0,0 +1,61 @@
+.. Copyright David Abrahams 2006. Distributed under the Boost
+.. Software License, Version 1.0. (See accompanying
+.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+Interoperable Iterator Concept
+..............................
+
+A class or built-in type ``X`` that models Single Pass Iterator is
+*interoperable with* a class or built-in type ``Y`` that also models
+Single Pass Iterator if the following expressions are valid and
+respect the stated semantics. In the tables below, ``x`` is an object
+of type ``X``, ``y`` is an object of type ``Y``, ``Distance`` is
+``iterator_traits<Y>::difference_type``, and ``n`` represents a
+constant object of type ``Distance``.
+
++-----------+-----------------------+---------------------------------------------------+
+|Expression |Return Type            |Assertion/Precondition/Postcondition               |
++===========+=======================+===================================================+
+|``y = x``  |``Y``                  |post: ``y == x``                                   |
++-----------+-----------------------+---------------------------------------------------+
+|``Y(x)``   |``Y``                  |post: ``Y(x) == x``                                |
++-----------+-----------------------+---------------------------------------------------+
+|``x == y`` |convertible to ``bool``|``==`` is an equivalence relation over its domain. |
++-----------+-----------------------+---------------------------------------------------+
+|``y == x`` |convertible to ``bool``|``==`` is an equivalence relation over its domain. |
++-----------+-----------------------+---------------------------------------------------+
+|``x != y`` |convertible to ``bool``|``bool(a==b) != bool(a!=b)`` over its domain.      |
++-----------+-----------------------+---------------------------------------------------+
+|``y != x`` |convertible to ``bool``|``bool(a==b) != bool(a!=b)`` over its domain.      |
++-----------+-----------------------+---------------------------------------------------+
+
+If ``X`` and ``Y`` both model Random Access Traversal Iterator then
+the following additional requirements must be met.
+
++-----------+-----------------------+---------------------+--------------------------------------+
+|Expression |Return Type            |Operational Semantics|Assertion/ Precondition               |
++===========+=======================+=====================+======================================+
+|``x < y``  |convertible to ``bool``|``y - x > 0``        |``<`` is a total ordering relation    |
++-----------+-----------------------+---------------------+--------------------------------------+
+|``y < x``  |convertible to ``bool``|``x - y > 0``        |``<`` is a total ordering relation    |
++-----------+-----------------------+---------------------+--------------------------------------+
+|``x > y``  |convertible to ``bool``|``y < x``            |``>`` is a total ordering relation    |
++-----------+-----------------------+---------------------+--------------------------------------+
+|``y > x``  |convertible to ``bool``|``x < y``            |``>`` is a total ordering relation    |
++-----------+-----------------------+---------------------+--------------------------------------+
+|``x >= y`` |convertible to ``bool``|``!(x < y)``         |                                      |
++-----------+-----------------------+---------------------+--------------------------------------+
+|``y >= x`` |convertible to ``bool``|``!(y < x)``         |                                      |
++-----------+-----------------------+---------------------+--------------------------------------+
+|``x <= y`` |convertible to ``bool``|``!(x > y)``         |                                      |
++-----------+-----------------------+---------------------+--------------------------------------+
+|``y <= x`` |convertible to ``bool``|``!(y > x)``         |                                      |
++-----------+-----------------------+---------------------+--------------------------------------+
+|``y - x``  |``Distance``           |``distance(Y(x),y)`` |pre: there exists a value ``n`` of    |
+|           |                       |                     |``Distance`` such that ``x + n == y``.|
+|           |                       |                     |``y == x + (y - x)``.                 |
++-----------+-----------------------+---------------------+--------------------------------------+ 
+|``x - y``  |``Distance``           |``distance(y,Y(x))`` |pre: there exists a value ``n`` of    |
+|           |                       |                     |``Distance`` such that ``y + n == x``.|
+|           |                       |                     |``x == y + (x - y)``.                 |
++-----------+-----------------------+---------------------+--------------------------------------+
diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2
new file mode 100644
index 0000000..27ad9cd
--- /dev/null
+++ b/doc/Jamfile.v2
@@ -0,0 +1,27 @@
+# Copyright Thomas Witt 2005. Use, modification, and distribution are
+# subject to the Boost Software License, Version 1.0. (See accompanying
+# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+using quickbook ;
+
+xml iterator 
+  : 
+    quickbook/iterator.qbk 
+  ;
+
+boostbook standalone 
+  : 
+    iterator 
+  :
+    <xsl:param>boost.root=../../../..
+    <xsl:param>toc.max.depth=3
+    <xsl:param>toc.section.depth=3
+    <xsl:param>chunk.section.depth=2
+    <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/iterator/doc
+  ;
+
+###############################################################################
+alias boostdoc ;
+explicit boostdoc ;
+alias boostrelease : standalone ;
+explicit boostrelease ;
diff --git a/doc/LvalueIterator.html b/doc/LvalueIterator.html
new file mode 100644
index 0000000..c20626c
--- /dev/null
+++ b/doc/LvalueIterator.html
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
+<title>Lvalue Iterator Concept</title>
+<link rel="stylesheet" href="../../../rst.css" type="text/css" />
+</head>
+<body>
+<div class="document" id="lvalue-iterator-concept">
+<h1 class="title">Lvalue Iterator Concept</h1>
+
+<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
+<!-- Software License, Version 1.0. (See accompanying -->
+<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
+<p>The <em>Lvalue Iterator</em> concept adds the requirement that the return
+type of <tt class="docutils literal"><span class="pre">operator*</span></tt> type be a reference to the value type of the
+iterator.</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="22%" />
+<col width="19%" />
+<col width="59%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head" colspan="3">Lvalue Iterator Requirements</th>
+</tr>
+<tr><th class="head">Expression</th>
+<th class="head">Return Type</th>
+<th class="head">Note/Assertion</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td><tt class="docutils literal"><span class="pre">*a</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">T&amp;</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">T</span></tt> is <em>cv</em>
+<tt class="docutils literal"><span class="pre">iterator_traits&lt;X&gt;::value_type</span></tt>
+where <em>cv</em> is an optional
+cv-qualification.
+pre: <tt class="docutils literal"><span class="pre">a</span></tt> is
+dereferenceable. If <tt class="docutils literal"><span class="pre">a</span>
+<span class="pre">==</span> <span class="pre">b</span></tt> then <tt class="docutils literal"><span class="pre">*a</span></tt> is
+equivalent to <tt class="docutils literal"><span class="pre">*b</span></tt>.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="footer">
+<hr class="footer" />
+<a class="reference external" href="LvalueIterator.rst">View document source</a>.
+Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
+
+</div>
+</body>
+</html>
diff --git a/doc/LvalueIterator.rst b/doc/LvalueIterator.rst
new file mode 100644
index 0000000..39c2672
--- /dev/null
+++ b/doc/LvalueIterator.rst
@@ -0,0 +1,25 @@
+.. Copyright David Abrahams 2006. Distributed under the Boost
+.. Software License, Version 1.0. (See accompanying
+.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+Lvalue Iterator Concept
+.......................
+
+The *Lvalue Iterator* concept adds the requirement that the return
+type of ``operator*`` type be a reference to the value type of the
+iterator.
+
++-------------------------------------------------------------+
+| Lvalue Iterator Requirements                                |
++-------------+-----------+-----------------------------------+
+|Expression   |Return Type|Note/Assertion                     |
++=============+===========+===================================+
+|``*a``       | ``T&``    |``T`` is *cv*                      |
+|             |           |``iterator_traits<X>::value_type`` |
+|             |           |where *cv* is an optional          |
+|             |           |cv-qualification.                  |
+|             |           |pre: ``a`` is                      |
+|             |           |dereferenceable. If ``a            |
+|             |           |== b`` then ``*a`` is              |
+|             |           |equivalent to ``*b``.              |
++-------------+-----------+-----------------------------------+
diff --git a/doc/RandomAccessTraversal.html b/doc/RandomAccessTraversal.html
new file mode 100644
index 0000000..4c681a6
--- /dev/null
+++ b/doc/RandomAccessTraversal.html
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
+<title>Random Access Traversal Concept</title>
+<link rel="stylesheet" href="../../../rst.css" type="text/css" />
+</head>
+<body>
+<div class="document" id="random-access-traversal-concept">
+<h1 class="title">Random Access Traversal Concept</h1>
+
+<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
+<!-- Software License, Version 1.0. (See accompanying -->
+<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
+<p>A class or built-in type <tt class="docutils literal"><span class="pre">X</span></tt> models the <em>Random Access Traversal</em>
+concept if the following expressions are valid and respect the stated
+semantics.  In the table below, <tt class="docutils literal"><span class="pre">Distance</span></tt> is
+<tt class="docutils literal"><span class="pre">iterator_traits&lt;X&gt;::difference_type</span></tt> and <tt class="docutils literal"><span class="pre">n</span></tt> represents a
+constant object of type <tt class="docutils literal"><span class="pre">Distance</span></tt>.</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="28%" />
+<col width="30%" />
+<col width="23%" />
+<col width="20%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head" colspan="4">Random Access Traversal Iterator Requirements (in addition to Bidirectional Traversal)</th>
+</tr>
+<tr><th class="head">Expression</th>
+<th class="head">Return Type</th>
+<th class="head">Operational Semantics</th>
+<th class="head">Assertion/
+Precondition</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td><tt class="docutils literal"><span class="pre">r</span> <span class="pre">+=</span> <span class="pre">n</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">X&amp;</span></tt></td>
+<td><pre class="first last literal-block">
+{
+  Distance m = n;
+  if (m &gt;= 0)
+    while (m--)
+      ++r;
+  else
+    while (m++)
+      --r;
+  return r;
+}
+</pre>
+</td>
+<td>&nbsp;</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">a</span> <span class="pre">+</span> <span class="pre">n</span></tt>, <tt class="docutils literal"><span class="pre">n</span> <span class="pre">+</span> <span class="pre">a</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">X</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">{</span> <span class="pre">X</span> <span class="pre">tmp</span> <span class="pre">=</span> <span class="pre">a;</span> <span class="pre">return</span> <span class="pre">tmp</span>
+<span class="pre">+=</span> <span class="pre">n;</span> <span class="pre">}</span></tt></td>
+<td>&nbsp;</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">r</span> <span class="pre">-=</span> <span class="pre">n</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">X&amp;</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">return</span> <span class="pre">r</span> <span class="pre">+=</span> <span class="pre">-n</span></tt></td>
+<td>&nbsp;</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">a</span> <span class="pre">-</span> <span class="pre">n</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">X</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">{</span> <span class="pre">X</span> <span class="pre">tmp</span> <span class="pre">=</span> <span class="pre">a;</span> <span class="pre">return</span> <span class="pre">tmp</span>
+<span class="pre">-=</span> <span class="pre">n;</span> <span class="pre">}</span></tt></td>
+<td>&nbsp;</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">b</span> <span class="pre">-</span> <span class="pre">a</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">Distance</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">a</span> <span class="pre">&lt;</span> <span class="pre">b</span> <span class="pre">?</span>&nbsp; <span class="pre">distance(a,b)</span>
+<span class="pre">:</span> <span class="pre">-distance(b,a)</span></tt></td>
+<td>pre: there exists a
+value <tt class="docutils literal"><span class="pre">n</span></tt> of
+<tt class="docutils literal"><span class="pre">Distance</span></tt> such that
+<tt class="docutils literal"><span class="pre">a</span> <span class="pre">+</span> <span class="pre">n</span> <span class="pre">==</span> <span class="pre">b</span></tt>.  <tt class="docutils literal"><span class="pre">b</span>
+<span class="pre">==</span> <span class="pre">a</span> <span class="pre">+</span> <span class="pre">(b</span> <span class="pre">-</span> <span class="pre">a)</span></tt>.</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">a[n]</span></tt></td>
+<td>convertible to T</td>
+<td><tt class="docutils literal"><span class="pre">*(a</span> <span class="pre">+</span> <span class="pre">n)</span></tt></td>
+<td>pre: a is a <em>Readable
+Iterator</em></td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">a[n]</span> <span class="pre">=</span> <span class="pre">v</span></tt></td>
+<td>convertible to T</td>
+<td><tt class="docutils literal"><span class="pre">*(a</span> <span class="pre">+</span> <span class="pre">n)</span> <span class="pre">=</span> <span class="pre">v</span></tt></td>
+<td>pre: a is a <em>Writable
+iterator</em></td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">a</span> <span class="pre">&lt;</span> <span class="pre">b</span></tt></td>
+<td>convertible to <tt class="docutils literal"><span class="pre">bool</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">b</span> <span class="pre">-</span> <span class="pre">a</span> <span class="pre">&gt;</span> <span class="pre">0</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">&lt;</span></tt> is a total
+ordering relation</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">a</span> <span class="pre">&gt;</span> <span class="pre">b</span></tt></td>
+<td>convertible to <tt class="docutils literal"><span class="pre">bool</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">b</span> <span class="pre">&lt;</span> <span class="pre">a</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">&gt;</span></tt> is a total
+ordering relation</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">a</span> <span class="pre">&gt;=</span> <span class="pre">b</span></tt></td>
+<td>convertible to <tt class="docutils literal"><span class="pre">bool</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">!(a</span> <span class="pre">&lt;</span> <span class="pre">b)</span></tt></td>
+<td>&nbsp;</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">a</span> <span class="pre">&lt;=</span> <span class="pre">b</span></tt></td>
+<td>convertible to <tt class="docutils literal"><span class="pre">bool</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">!(a</span> <span class="pre">&gt;</span> <span class="pre">b)</span></tt></td>
+<td>&nbsp;</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">iterator_traversal&lt;X&gt;::type</span></tt></td>
+<td>Convertible to
+<tt class="docutils literal"><span class="pre">random_access_traversal_tag</span></tt></td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="footer">
+<hr class="footer" />
+<a class="reference external" href="RandomAccessTraversal.rst">View document source</a>.
+Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
+
+</div>
+</body>
+</html>
diff --git a/doc/RandomAccessTraversal.rst b/doc/RandomAccessTraversal.rst
new file mode 100644
index 0000000..490faf6
--- /dev/null
+++ b/doc/RandomAccessTraversal.rst
@@ -0,0 +1,67 @@
+.. Copyright David Abrahams 2006. Distributed under the Boost
+.. Software License, Version 1.0. (See accompanying
+.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+Random Access Traversal Concept
+...............................
+
+A class or built-in type ``X`` models the *Random Access Traversal*
+concept if the following expressions are valid and respect the stated
+semantics.  In the table below, ``Distance`` is
+``iterator_traits<X>::difference_type`` and ``n`` represents a
+constant object of type ``Distance``.
+
++------------------------------------------------------------------------------------------------------------------+
+|Random Access Traversal Iterator Requirements (in addition to Bidirectional Traversal)                            |
++-------------------------------+---------------------------------+-------------------------+----------------------+
+|Expression                     |Return Type                      |Operational Semantics    |Assertion/            |
+|                               |                                 |                         |Precondition          |
++===============================+=================================+=========================+======================+
+|``r += n``                     |``X&``                           |::                       |                      |
+|                               |                                 |                         |                      |
+|                               |                                 | {                       |                      |
+|                               |                                 |   Distance m = n;       |                      |
+|                               |                                 |   if (m >= 0)           |                      |
+|                               |                                 |     while (m--)         |                      |
+|                               |                                 |       ++r;              |                      |
+|                               |                                 |   else                  |                      |
+|                               |                                 |     while (m++)         |                      |
+|                               |                                 |       --r;              |                      |
+|                               |                                 |   return r;             |                      |
+|                               |                                 | }                       |                      |
++-------------------------------+---------------------------------+-------------------------+----------------------+
+|``a + n``, ``n + a``           |``X``                            |``{ X tmp = a; return tmp|                      |
+|                               |                                 |+= n; }``                |                      |
+|                               |                                 |                         |                      |
++-------------------------------+---------------------------------+-------------------------+----------------------+
+|``r -= n``                     |``X&``                           |``return r += -n``       |                      |
++-------------------------------+---------------------------------+-------------------------+----------------------+
+|``a - n``                      |``X``                            |``{ X tmp = a; return tmp|                      |
+|                               |                                 |-= n; }``                |                      |
+|                               |                                 |                         |                      |
++-------------------------------+---------------------------------+-------------------------+----------------------+
+|``b - a``                      |``Distance``                     |``a < b ?  distance(a,b) |pre: there exists a   |
+|                               |                                 |: -distance(b,a)``       |value ``n`` of        |
+|                               |                                 |                         |``Distance`` such that|
+|                               |                                 |                         |``a + n == b``.  ``b  |
+|                               |                                 |                         |== a + (b - a)``.     |
++-------------------------------+---------------------------------+-------------------------+----------------------+
+|``a[n]``                       |convertible to T                 |``*(a + n)``             |pre: a is a *Readable |
+|                               |                                 |                         |Iterator*             |
++-------------------------------+---------------------------------+-------------------------+----------------------+
+|``a[n] = v``                   |convertible to T                 |``*(a + n) = v``         |pre: a is a *Writable |
+|                               |                                 |                         |iterator*             |
++-------------------------------+---------------------------------+-------------------------+----------------------+
+|``a < b``                      |convertible to ``bool``          |``b - a > 0``            |``<`` is a total      |
+|                               |                                 |                         |ordering relation     |
++-------------------------------+---------------------------------+-------------------------+----------------------+
+|``a > b``                      |convertible to ``bool``          |``b < a``                |``>`` is a total      |
+|                               |                                 |                         |ordering relation     |
++-------------------------------+---------------------------------+-------------------------+----------------------+
+|``a >= b``                     |convertible to ``bool``          |``!(a < b)``             |                      |
++-------------------------------+---------------------------------+-------------------------+----------------------+
+|``a <= b``                     |convertible to ``bool``          |``!(a > b)``             |                      |
++-------------------------------+---------------------------------+-------------------------+----------------------+
+|``iterator_traversal<X>::type``|Convertible to                   |                         |                      |
+|                               |``random_access_traversal_tag``  |                         |                      |
++-------------------------------+---------------------------------+-------------------------+----------------------+
diff --git a/doc/ReadableIterator.html b/doc/ReadableIterator.html
new file mode 100644
index 0000000..04be021
--- /dev/null
+++ b/doc/ReadableIterator.html
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
+<title>Readable Iterator Concept</title>
+<link rel="stylesheet" href="../../../rst.css" type="text/css" />
+</head>
+<body>
+<div class="document" id="readable-iterator-concept">
+<h1 class="title">Readable Iterator Concept</h1>
+
+<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
+<!-- Software License, Version 1.0. (See accompanying -->
+<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
+<p>A class or built-in type <tt class="docutils literal"><span class="pre">X</span></tt> models the <em>Readable Iterator</em> concept
+for value type <tt class="docutils literal"><span class="pre">T</span></tt> if, in addition to <tt class="docutils literal"><span class="pre">X</span></tt> being Assignable and
+Copy Constructible, the following expressions are valid and respect
+the stated semantics. <tt class="docutils literal"><span class="pre">U</span></tt> is the type of any specified member of
+type <tt class="docutils literal"><span class="pre">T</span></tt>.</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="28%" />
+<col width="20%" />
+<col width="52%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head" colspan="3">Readable Iterator Requirements (in addition to Assignable and Copy Constructible)</th>
+</tr>
+<tr><th class="head">Expression</th>
+<th class="head">Return Type</th>
+<th class="head">Note/Precondition</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td><tt class="docutils literal"><span class="pre">iterator_traits&lt;X&gt;::value_type</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">T</span></tt></td>
+<td>Any non-reference,
+non-cv-qualified type</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">*a</span></tt></td>
+<td>Convertible to <tt class="docutils literal"><span class="pre">T</span></tt></td>
+<td><dl class="first last docutils">
+<dt>pre: <tt class="docutils literal"><span class="pre">a</span></tt> is dereferenceable. If <tt class="docutils literal"><span class="pre">a</span> <span class="pre">==</span> <span class="pre">b</span></tt> then <tt class="docutils literal"><span class="pre">*a</span></tt></dt>
+<dd>is equivalent to <tt class="docutils literal"><span class="pre">*b</span></tt>.</dd>
+</dl>
+</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">a-&gt;m</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">U&amp;</span></tt></td>
+<td>pre: <tt class="docutils literal"><span class="pre">pre:</span> <span class="pre">(*a).m</span></tt> is well-defined. Equivalent to <tt class="docutils literal"><span class="pre">(*a).m</span></tt>.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="footer">
+<hr class="footer" />
+<a class="reference external" href="ReadableIterator.rst">View document source</a>.
+Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
+
+</div>
+</body>
+</html>
diff --git a/doc/ReadableIterator.rst b/doc/ReadableIterator.rst
new file mode 100644
index 0000000..27f79f8
--- /dev/null
+++ b/doc/ReadableIterator.rst
@@ -0,0 +1,26 @@
+.. Copyright David Abrahams 2006. Distributed under the Boost
+.. Software License, Version 1.0. (See accompanying
+.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+Readable Iterator Concept
+.........................
+
+A class or built-in type ``X`` models the *Readable Iterator* concept
+for value type ``T`` if, in addition to ``X`` being Assignable and
+Copy Constructible, the following expressions are valid and respect
+the stated semantics. ``U`` is the type of any specified member of
+type ``T``.
+
++-----------------------------------------------------------------------------------------------------------------------------+
+|Readable Iterator Requirements (in addition to Assignable and Copy Constructible)                                            |
++-----------------------------------+------------------------+----------------------------------------------------------------+
+|Expression                         |Return Type             |Note/Precondition                                               |
++===================================+========================+================================================================+
+|``iterator_traits<X>::value_type`` |``T``                   |Any non-reference,                                              |
+|                                   |                        |non-cv-qualified type                                           |
++-----------------------------------+------------------------+----------------------------------------------------------------+
+|``*a``                             | Convertible to ``T``   |pre: ``a`` is dereferenceable. If ``a == b`` then ``*a``        |
+|                                   |                        | is equivalent to ``*b``.                                       |
++-----------------------------------+------------------------+----------------------------------------------------------------+
+|``a->m``                           |``U&``                  |pre: ``pre: (*a).m`` is well-defined. Equivalent to ``(*a).m``. |
++-----------------------------------+------------------------+----------------------------------------------------------------+
diff --git a/doc/SinglePassIterator.html b/doc/SinglePassIterator.html
new file mode 100644
index 0000000..bc2835d
--- /dev/null
+++ b/doc/SinglePassIterator.html
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
+<title>Single Pass Iterator Concept</title>
+<link rel="stylesheet" href="../../../rst.css" type="text/css" />
+</head>
+<body>
+<div class="document" id="single-pass-iterator-concept">
+<h1 class="title">Single Pass Iterator Concept</h1>
+
+<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
+<!-- Software License, Version 1.0. (See accompanying -->
+<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
+<p>A class or built-in type <tt class="docutils literal"><span class="pre">X</span></tt> models the <em>Single Pass Iterator</em>
+concept if the following expressions are valid and respect the stated
+semantics.</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="36%" />
+<col width="33%" />
+<col width="31%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head" colspan="3">Single Pass Iterator Requirements (in addition to Incrementable Iterator and Equality
+Comparable)</th>
+</tr>
+<tr><th class="head">Expression</th>
+<th class="head">Return Type</th>
+<th class="head">Assertion/Semantics /
+Pre-/Post-condition</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td><tt class="docutils literal"><span class="pre">++r</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">X&amp;</span></tt></td>
+<td>pre: <tt class="docutils literal"><span class="pre">r</span></tt> is
+dereferenceable; post:
+<tt class="docutils literal"><span class="pre">r</span></tt> is dereferenceable or
+<tt class="docutils literal"><span class="pre">r</span></tt> is past-the-end</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">a</span> <span class="pre">==</span> <span class="pre">b</span></tt></td>
+<td>convertible to <tt class="docutils literal"><span class="pre">bool</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">==</span></tt> is an equivalence
+relation over its domain</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">a</span> <span class="pre">!=</span> <span class="pre">b</span></tt></td>
+<td>convertible to <tt class="docutils literal"><span class="pre">bool</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">!(a</span> <span class="pre">==</span> <span class="pre">b)</span></tt></td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">iterator_traversal&lt;X&gt;::type</span></tt></td>
+<td>Convertible to
+<tt class="docutils literal"><span class="pre">single_pass_traversal_tag</span></tt></td>
+<td>&nbsp;</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="footer">
+<hr class="footer" />
+<a class="reference external" href="SinglePassIterator.rst">View document source</a>.
+Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
+
+</div>
+</body>
+</html>
diff --git a/doc/SinglePassIterator.rst b/doc/SinglePassIterator.rst
new file mode 100644
index 0000000..eaa50e0
--- /dev/null
+++ b/doc/SinglePassIterator.rst
@@ -0,0 +1,32 @@
+.. Copyright David Abrahams 2006. Distributed under the Boost
+.. Software License, Version 1.0. (See accompanying
+.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+Single Pass Iterator Concept
+............................
+
+A class or built-in type ``X`` models the *Single Pass Iterator*
+concept if the following expressions are valid and respect the stated
+semantics.
+
+
++------------------------------------------------------------------------------------------+
+|Single Pass Iterator Requirements (in addition to Incrementable Iterator and Equality     |
+|Comparable)                                                                               |
++--------------------------------+-----------------------------+---------------------------+
+|Expression                      |Return Type                  |Assertion/Semantics /      | 
+|                                |                             |Pre-/Post-condition        |
++================================+=============================+===========================+
+|``++r``                         |``X&``                       |pre: ``r`` is              |
+|                                |                             |dereferenceable; post:     |
+|                                |                             |``r`` is dereferenceable or|
+|                                |                             |``r`` is past-the-end      |
++--------------------------------+-----------------------------+---------------------------+
+|``a == b``                      |convertible to ``bool``      |``==`` is an equivalence   |
+|                                |                             |relation over its domain   |
++--------------------------------+-----------------------------+---------------------------+
+|``a != b``                      |convertible to ``bool``      |``!(a == b)``              |
++--------------------------------+-----------------------------+---------------------------+
+|``iterator_traversal<X>::type`` |Convertible to               |                           |
+|                                |``single_pass_traversal_tag``|                           |
++--------------------------------+-----------------------------+---------------------------+
diff --git a/doc/SwappableIterator.html b/doc/SwappableIterator.html
new file mode 100644
index 0000000..e3c1eae
--- /dev/null
+++ b/doc/SwappableIterator.html
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
+<title>Swappable Iterator Concept</title>
+<link rel="stylesheet" href="../../../rst.css" type="text/css" />
+</head>
+<body>
+<div class="document" id="swappable-iterator-concept">
+<h1 class="title">Swappable Iterator Concept</h1>
+
+<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
+<!-- Software License, Version 1.0. (See accompanying -->
+<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
+<p>A class or built-in type <tt class="docutils literal"><span class="pre">X</span></tt> models the <em>Swappable Iterator</em> concept
+if, in addition to <tt class="docutils literal"><span class="pre">X</span></tt> being Copy Constructible, the following
+expressions are valid and respect the stated semantics.</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="37%" />
+<col width="19%" />
+<col width="43%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head" colspan="3">Swappable Iterator Requirements (in addition to Copy Constructible)</th>
+</tr>
+<tr><th class="head">Expression</th>
+<th class="head">Return Type</th>
+<th class="head">Postcondition</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td><tt class="docutils literal"><span class="pre">iter_swap(a,</span> <span class="pre">b)</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">void</span></tt></td>
+<td>the pointed to values are
+exchanged</td>
+</tr>
+</tbody>
+</table>
+<dl class="docutils">
+<dt>[<em>Note:</em> An iterator that is a model of the <em>Readable</em> and <em>Writable Iterator</em> concepts</dt>
+<dd>is also a model of <em>Swappable Iterator</em>.  <em>--end note</em>]</dd>
+</dl>
+</div>
+<div class="footer">
+<hr class="footer" />
+<a class="reference external" href="SwappableIterator.rst">View document source</a>.
+Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
+
+</div>
+</body>
+</html>
diff --git a/doc/SwappableIterator.rst b/doc/SwappableIterator.rst
new file mode 100644
index 0000000..55554e7
--- /dev/null
+++ b/doc/SwappableIterator.rst
@@ -0,0 +1,23 @@
+.. Copyright David Abrahams 2006. Distributed under the Boost
+.. Software License, Version 1.0. (See accompanying
+.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+Swappable Iterator Concept
+..........................
+
+A class or built-in type ``X`` models the *Swappable Iterator* concept
+if, in addition to ``X`` being Copy Constructible, the following
+expressions are valid and respect the stated semantics.
+
++---------------------------------------------------------------------+
+|Swappable Iterator Requirements (in addition to Copy Constructible)  |
++-------------------------+-------------+-----------------------------+
+|Expression               |Return Type  |Postcondition                |
++=========================+=============+=============================+
+|``iter_swap(a, b)``      |``void``     |the pointed to values are    |
+|                         |             |exchanged                    |
++-------------------------+-------------+-----------------------------+
+
+[*Note:* An iterator that is a model of the *Readable* and *Writable Iterator* concepts
+  is also a model of *Swappable Iterator*.  *--end note*]
+
diff --git a/doc/WritableIterator.html b/doc/WritableIterator.html
new file mode 100644
index 0000000..7247474
--- /dev/null
+++ b/doc/WritableIterator.html
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
+<title>Writable Iterator Concept</title>
+<link rel="stylesheet" href="../../../rst.css" type="text/css" />
+</head>
+<body>
+<div class="document" id="writable-iterator-concept">
+<h1 class="title">Writable Iterator Concept</h1>
+
+<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
+<!-- Software License, Version 1.0. (See accompanying -->
+<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
+<p>A class or built-in type <tt class="docutils literal"><span class="pre">X</span></tt> models the <em>Writable Iterator</em> concept
+if, in addition to <tt class="docutils literal"><span class="pre">X</span></tt> being Copy Constructible, the following
+expressions are valid and respect the stated semantics.  Writable
+Iterators have an associated <em>set of value types</em>.</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="37%" />
+<col width="21%" />
+<col width="42%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head" colspan="3">Writable Iterator Requirements (in addition to Copy Constructible)</th>
+</tr>
+<tr><th class="head">Expression</th>
+<th class="head">Return Type</th>
+<th class="head">Precondition</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td><tt class="docutils literal"><span class="pre">*a</span> <span class="pre">=</span> <span class="pre">o</span></tt></td>
+<td>&nbsp;</td>
+<td>pre: The type of <tt class="docutils literal"><span class="pre">o</span></tt>
+is in the set of
+value types of <tt class="docutils literal"><span class="pre">X</span></tt></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="footer">
+<hr class="footer" />
+<a class="reference external" href="WritableIterator.rst">View document source</a>.
+Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
+
+</div>
+</body>
+</html>
diff --git a/doc/WritableIterator.rst b/doc/WritableIterator.rst
new file mode 100644
index 0000000..49b6e16
--- /dev/null
+++ b/doc/WritableIterator.rst
@@ -0,0 +1,21 @@
+.. Copyright David Abrahams 2006. Distributed under the Boost
+.. Software License, Version 1.0. (See accompanying
+.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+Writable Iterator Concept
+.........................
+
+A class or built-in type ``X`` models the *Writable Iterator* concept
+if, in addition to ``X`` being Copy Constructible, the following
+expressions are valid and respect the stated semantics.  Writable
+Iterators have an associated *set of value types*.
+
++---------------------------------------------------------------------+
+|Writable Iterator Requirements (in addition to Copy Constructible)   |
++-------------------------+--------------+----------------------------+
+|Expression               |Return Type   |Precondition                |
++=========================+==============+============================+
+|``*a = o``               |              | pre: The type of ``o``     |
+|                         |              | is in the set of           |
+|                         |              | value types of ``X``       |
++-------------------------+--------------+----------------------------+