Squashed 'third_party/boostorg/concept_check/' content from commit ed0a0eb

Change-Id: Ib7230965334f9501601efc300242efde8352a380
git-subtree-dir: third_party/boostorg/concept_check
git-subtree-split: ed0a0ebd72f778cfa4931e0538ea34c28db3a42b
diff --git a/doc/reference/Assignable.xml b/doc/reference/Assignable.xml
new file mode 100644
index 0000000..56f4052
--- /dev/null
+++ b/doc/reference/Assignable.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<concept name="Assignable" category="Utility"><!--
+Based on concepts from the SGI Standard Template Library documentation:
+Copyright (c) 1996-1999
+Silicon Graphics Computer Systems, Inc.
+
+Copyright (c) 1994
+Hewlett-Packard Company
+--><!--
+Copyright 2000-2001 University of Notre Dame du Lac.
+Copyright 2001-2002 Indiana University.
+Some concepts based on versions from the MTL draft manual and Boost Graph
+and Property Map documentation:
+Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
+-->
+  <param name="X" role="assignable-type"/>
+
+  <models-sentence>The type <arg num="1"/> must be a model of <self/>.</models-sentence>
+
+  <description>
+    <para>Assignable types must have copy constructors,
+    <code>operator=</code> for assignment, and the <code>swap()</code>
+    function defined.</para>
+  </description>
+
+  <notation variables="x y">
+    <sample-value>
+      <type name="X"/>
+    </sample-value>
+  </notation>
+
+  <refines const="no" concept="CopyConstructible"/>
+
+  <valid-expression name="Assignment">
+    <assign>
+      <sample-value><reference-to><type name="X"/></reference-to></sample-value>
+      <sample-value><const><reference-to><type name="X"/></reference-to></const></sample-value>
+    </assign>
+    <return-type>
+      <require-same-type testable="yes">
+	<reference-to><type name="X"/></reference-to>
+      </require-same-type>
+    </return-type>
+    <semantics>Require <code>operator=</code></semantics>
+  </valid-expression>
+
+  <valid-expression name="Swap">
+    <apply-function name="swap">
+      <sample-value><reference-to><type name="X"/></reference-to></sample-value>
+      <sample-value><reference-to><type name="X"/></reference-to></sample-value>
+    </apply-function>
+    <return-type><require-same-type><type name="void"/></require-same-type></return-type>
+    <semantics>Require <code>swap()</code> function</semantics>
+  </valid-expression>
+
+  <example-model>
+    <type name="int"/>
+  </example-model>
+</concept>
diff --git a/doc/reference/BidirectionalIterator.xml b/doc/reference/BidirectionalIterator.xml
new file mode 100644
index 0000000..9b6b9f6
--- /dev/null
+++ b/doc/reference/BidirectionalIterator.xml
@@ -0,0 +1,136 @@
+<?xml version="1.0"?>
+<concept name="BidirectionalIterator" category="Iterator"><!--
+Based on concepts from the SGI Standard Template Library documentation:
+Copyright (c) 1996-1999
+Silicon Graphics Computer Systems, Inc.
+
+Copyright (c) 1994
+Hewlett-Packard Company
+--><!--
+Copyright 2000-2001 University of Notre Dame du Lac.
+Copyright 2001-2002 Indiana University.
+Some concepts based on versions from the MTL draft manual and Boost Graph
+and Property Map documentation:
+Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
+-->
+  <param name="Iter" role="iterator-type"/>
+
+  <use-header name="iterator"/>
+
+  <models-sentence>The iterator type <arg num="1"/> must be a model of <self/>.</models-sentence>
+
+  <description>
+  <para>A bidirectional iterator is an iterator that can read through a sequence
+  of values.  It can move in either direction through the sequence, and can
+  be either mutable (data pointed to by it can be changed) or not mutable.</para>
+
+  <para>An iterator represents a position in a sequence.  Therefore, the
+  iterator can point into the sequence (returning a value when dereferenced
+  and being incrementable), or be off-the-end (and not dereferenceable or
+  incrementable).</para>
+  </description>
+
+  <associated-type name="value_type">
+    <get-member-type name="value_type">
+      <apply-template name="std::iterator_traits">
+	<type name="Iter"/>
+      </apply-template>
+    </get-member-type>
+    <description><simpara>The value type of the iterator</simpara></description>
+  </associated-type>
+
+  <refines const="no" concept="ForwardIterator"/>
+
+  <notation variables="i j">
+    <sample-value>
+      <type name="Iter"/>
+    </sample-value>
+  </notation>
+
+  <associated-type name="category">
+    <get-member-type name="iterator_category">
+      <apply-template name="std::iterator_traits">
+	<type name="Iter"/>
+      </apply-template>
+    </get-member-type>
+    <description><simpara>The category of the iterator</simpara></description>
+  </associated-type>
+
+  <notation variables="x">
+    <sample-value>
+      <type name="value_type"/>
+    </sample-value>
+  </notation>
+
+  <valid-type-expression name="Category tag">
+    <description/>
+    <type name="category"/>
+    <return-type>
+      <derived-from testable="yes">
+	<type name="std::bidirectional_iterator_tag"/>
+      </derived-from>
+    </return-type>
+  </valid-type-expression>
+
+  <valid-expression name="Predecrement">
+    <predecrement>
+      <sample-value><reference-to><type name="Iter"/></reference-to></sample-value>
+    </predecrement>
+    <return-type>
+      <require-same-type testable="yes">
+	<reference-to><type name="Iter"/></reference-to>
+      </require-same-type>
+    </return-type>
+    <precondition><code>i</code> is incrementable (not
+    off-the-end) and some dereferenceable iterator <code>j</code> exists
+    such that <code>i == ++j</code></precondition>
+  </valid-expression>
+
+  <valid-expression name="Postdecrement">
+    <postdecrement>
+      <sample-value><reference-to><type name="Iter"/></reference-to></sample-value>
+    </postdecrement>
+    <return-type>
+      <require-same-type testable="yes"><type name="Iter"/></require-same-type>
+    </return-type>
+    <precondition>Same as for predecrement</precondition>
+    <semantics>Equivalent to <code>{Iter j = i; --i; return j;}</code></semantics>
+    <postcondition><code>i</code> is dereferenceable or
+    off-the-end</postcondition>
+  </valid-expression>
+
+  <complexity>
+  All iterator operations must take amortized constant time.
+  </complexity>
+
+  <invariant name="Predecrement must return object">
+  <code>&amp;i = &amp;(--i)</code>
+  </invariant>
+
+  <invariant name="Unique path through sequence">
+  <code>i == j</code> implies <code>--i == --j</code>
+  </invariant>
+
+  <invariant name="Increment and decrement are inverses">
+  <code>++i; --i;</code> and <code>--i; ++i;</code> must end up with the
+  value of <code>i</code> unmodified, if <code>i</code> both of the
+  operations in the pair are valid.
+  </invariant>
+
+  <example-model>
+    <pointer-to>
+      <type name="T"/>
+    </pointer-to>
+  </example-model>
+
+  <example-model>
+    <get-member-type name="iterator">
+      <apply-template name="std::list">
+	<type name="T"/>
+      </apply-template>
+    </get-member-type>
+  </example-model>
+
+  <see-also concept="RandomAccessIterator"/>
+
+</concept>
diff --git a/doc/reference/CopyConstructible.xml b/doc/reference/CopyConstructible.xml
new file mode 100644
index 0000000..9d278f3
--- /dev/null
+++ b/doc/reference/CopyConstructible.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<concept name="CopyConstructible" category="Utility"><!--
+Based on concepts from the SGI Standard Template Library documentation:
+Copyright (c) 1996-1999
+Silicon Graphics Computer Systems, Inc.
+
+Copyright (c) 1994
+Hewlett-Packard Company
+--><!--
+Copyright 2000-2001 University of Notre Dame du Lac.
+Copyright 2001-2002 Indiana University.
+Some concepts based on versions from the MTL draft manual and Boost Graph
+and Property Map documentation:
+Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
+-->
+  <param name="X" role="copy-constructible-type"/>
+
+  <models-sentence>The type <arg num="1"/> must be a model of <self/>.</models-sentence>
+
+  <description>
+  <para>Copy constructible types must be able to be constructed from another
+  member of the type.</para>
+  </description>
+
+  <notation variables="x y">
+    <sample-value>
+      <type name="X"/>
+    </sample-value>
+  </notation>
+
+  <valid-expression name="Copy construction">
+    <construct template-parameters="">
+      <type name="X"/>
+      <sample-value><const><reference-to><type name="X"/></reference-to></const></sample-value>
+    </construct>
+    <return-type>
+      <require-same-type testable="yes">
+	<type name="X"/>
+      </require-same-type>
+    </return-type>
+    <semantics>Require copy constructor.</semantics>
+  </valid-expression>
+
+  <example-model>
+    <type name="int"/>
+  </example-model>
+</concept>
diff --git a/doc/reference/DefaultConstructible.xml b/doc/reference/DefaultConstructible.xml
new file mode 100644
index 0000000..1886ab0
--- /dev/null
+++ b/doc/reference/DefaultConstructible.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<concept name="DefaultConstructible" category="Utility"><!--
+Based on concepts from the SGI Standard Template Library documentation:
+Copyright (c) 1996-1999
+Silicon Graphics Computer Systems, Inc.
+
+Copyright (c) 1994
+Hewlett-Packard Company
+--><!--
+Copyright 2000-2001 University of Notre Dame du Lac.
+Copyright 2001-2002 Indiana University.
+Some concepts based on versions from the MTL draft manual and Boost Graph
+and Property Map documentation:
+Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
+-->
+  <param name="X" role="default-constructible-type"/>
+
+  <models-sentence>The type <arg num="1"/> must be a model of <self/>.</models-sentence>
+
+  <description><para>DefaultConstructible objects only need to have a default
+  constructor.</para></description>
+
+  <valid-expression name="Construction">
+    <construct template-parameters="">
+      <type name="X"/>
+    </construct>
+    <return-type><require-same-type testable="yes"><type name="X"/></require-same-type></return-type>
+    <semantics>Construct an instance of the type with default parameters.</semantics>
+  </valid-expression>
+
+  <example-model>
+    <type name="int"/>
+  </example-model>
+
+  <example-model>
+    <apply-template name="std::vector">
+      <type name="double"/>
+    </apply-template>
+  </example-model>
+</concept>
diff --git a/doc/reference/EqualityComparable.xml b/doc/reference/EqualityComparable.xml
new file mode 100644
index 0000000..5d5479a
--- /dev/null
+++ b/doc/reference/EqualityComparable.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<concept name="EqualityComparable" category="Utility"><!--
+Based on concepts from the SGI Standard Template Library documentation:
+Copyright (c) 1996-1999
+Silicon Graphics Computer Systems, Inc.
+
+Copyright (c) 1994
+Hewlett-Packard Company
+--><!--
+Copyright 2000-2001 University of Notre Dame du Lac.
+Copyright 2001-2002 Indiana University.
+Some concepts based on versions from the MTL draft manual and Boost Graph
+and Property Map documentation:
+Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
+-->
+  <param name="X" role="comparable-type"/>
+
+  <models-sentence>The type <arg num="1"/> must be a model of
+  <self/>.</models-sentence>
+
+  <description><para>Equality Comparable types must have <code>==</code> and
+  <code>!=</code> operators.</para></description>
+
+  <notation variables="x y">
+    <sample-value>
+      <type name="X"/>
+    </sample-value>
+  </notation>
+
+  <valid-expression name="Equality test">
+    <equal-to>
+      <sample-value><type name="X"/></sample-value>
+      <sample-value><type name="X"/></sample-value>
+    </equal-to>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="bool"/>
+      </convertible-to>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Inequality test">
+    <not-equal-to>
+      <sample-value><type name="X"/></sample-value>
+      <sample-value><type name="X"/></sample-value>
+    </not-equal-to>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="bool"/>
+      </convertible-to>
+    </return-type>
+  </valid-expression>
+
+  <example-model>
+    <type name="int"/>
+  </example-model>
+
+  <example-model>
+    <apply-template name="std::vector">
+      <type name="int"/>
+    </apply-template>
+  </example-model>
+</concept>
diff --git a/doc/reference/ForwardIterator.xml b/doc/reference/ForwardIterator.xml
new file mode 100644
index 0000000..dffe0ae
--- /dev/null
+++ b/doc/reference/ForwardIterator.xml
@@ -0,0 +1,174 @@
+<?xml version="1.0"?>
+<concept name="ForwardIterator" category="Iterator"><!--
+Based on concepts from the SGI Standard Template Library documentation:
+Copyright (c) 1996-1999
+Silicon Graphics Computer Systems, Inc.
+
+Copyright (c) 1994
+Hewlett-Packard Company
+--><!--
+Copyright 2000-2001 University of Notre Dame du Lac.
+Copyright 2001-2002 Indiana University.
+Some concepts based on versions from the MTL draft manual and Boost Graph
+and Property Map documentation:
+Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
+-->
+  <param name="Iter" role="iterator-type"/>
+
+  <use-header name="iterator"/>
+
+  <models-sentence>The iterator type <arg num="1"/> must be a model of <self/>.</models-sentence>
+
+  <description>
+  <para>A forward iterator is an iterator that can read through a sequence of
+  values.  It is multi-pass (old values of the iterator can be
+  re-used), and can be either mutable (data pointed to by it can be
+  changed) or not mutable.</para>
+
+  <para>An iterator represents a position in a sequence.  Therefore, the
+  iterator can point into the sequence (returning a value when dereferenced
+  and being incrementable), or be off-the-end (and not dereferenceable or
+  incrementable).</para>
+  </description>
+
+  <associated-type name="value_type">
+    <get-member-type name="value_type">
+      <apply-template name="std::iterator_traits">
+	<type name="Iter"/>
+      </apply-template>
+    </get-member-type>
+    <description><simpara>The value type of the iterator</simpara></description>
+  </associated-type>
+
+  <refines const="no" concept="InputIterator"/>
+  <refines const="no" concept="OutputIterator"/>
+
+<!-- DPG doesn't understand this
+  <models const="no" testable="yes" concept="Input Iterator">
+    <type name="Iter"/>
+  </models>
+-->
+<!--
+  <models-when-mutable concept="Output Iterator">
+    <type name="Iter"/>
+    <type name="value_type"/>
+  </models-when-mutable>
+-->
+
+  <notation variables="i j">
+    <sample-value>
+      <type name="Iter"/>
+    </sample-value>
+  </notation>
+
+  <associated-type name="category">
+    <get-member-type name="iterator_category">
+      <apply-template name="std::iterator_traits">
+	<type name="Iter"/>
+      </apply-template>
+    </get-member-type>
+    <description><simpara>The category of the iterator</simpara></description>
+  </associated-type>
+
+  <notation variables="x">
+    <sample-value>
+      <type name="value_type"/>
+    </sample-value>
+  </notation>
+
+  <valid-type-expression name="Category tag">
+    <description/>
+    <type name="category"/>
+    <return-type>
+      <derived-from testable="yes">
+	<type name="std::forward_iterator_tag"/>
+      </derived-from>
+    </return-type>
+  </valid-type-expression>
+
+  <valid-expression name="Dereference">
+    <dereference>
+      <sample-value><type name="Iter"/></sample-value>
+    </dereference>
+    <return-type>
+      <require-same-type testable="yes">
+	<const-if-not-mutable>
+	  <reference-to><type name="value_type"/></reference-to>
+	</const-if-not-mutable>
+      </require-same-type>
+    </return-type>
+    <precondition><code>i</code> is incrementable (not
+    off-the-end)</precondition>
+  </valid-expression>
+
+  <valid-expression name="Member access">
+    <pointer-member>
+      <sample-value><type name="Iter"/></sample-value>
+    </pointer-member>
+    <return-type>
+      <require-same-type testable="yes">
+	<const-if-not-mutable>
+	  <pointer-to><type name="value_type"/></pointer-to>
+	</const-if-not-mutable>
+      </require-same-type>
+    </return-type>
+    <precondition><code>i</code> is incrementable (not
+    off-the-end)</precondition>
+  </valid-expression>
+
+  <valid-expression name="Preincrement">
+    <preincrement>
+      <sample-value><reference-to><type name="Iter"/></reference-to></sample-value>
+    </preincrement>
+    <return-type>
+      <require-same-type testable="yes">
+	<reference-to><type name="Iter"/></reference-to>
+      </require-same-type>
+    </return-type>
+    <precondition><code>i</code> is incrementable (not
+    off-the-end)</precondition>
+  </valid-expression>
+
+  <valid-expression name="Postincrement">
+    <postincrement>
+      <sample-value><reference-to><type name="Iter"/></reference-to></sample-value>
+    </postincrement>
+    <return-type>
+      <require-same-type testable="yes"><type name="Iter"/></require-same-type>
+    </return-type>
+    <precondition><code>i</code> is incrementable (not
+    off-the-end)</precondition>
+    <semantics>Equivalent to <code>{Iter j = i; ++i; return j;}</code></semantics>
+    <postcondition><code>i</code> is dereferenceable or
+    off-the-end</postcondition>
+  </valid-expression>
+
+  <complexity>
+  All iterator operations must take amortized constant time.
+  </complexity>
+
+  <invariant name="Predecrement must return object">
+  <code>&amp;i = &amp;(++i)</code>
+  </invariant>
+
+  <invariant name="Unique path through sequence">
+  <code>i == j</code> implies <code>++i == ++j</code>
+  </invariant>
+
+  <example-model>
+    <pointer-to>
+      <type name="T"/>
+    </pointer-to>
+  </example-model>
+
+  <example-model>
+    <get-member-type name="iterator">
+      <apply-template name="std::hash_set">
+	<type name="T"/>
+      </apply-template>
+    </get-member-type>
+  </example-model>
+
+  <see-also concept="BidirectionalIterator"/>
+
+</concept>
diff --git a/doc/reference/InputIterator.xml b/doc/reference/InputIterator.xml
new file mode 100644
index 0000000..794c62c
--- /dev/null
+++ b/doc/reference/InputIterator.xml
@@ -0,0 +1,168 @@
+<?xml version="1.0"?>
+<concept name="InputIterator" category="Iterator"><!--
+Based on concepts from the SGI Standard Template Library documentation:
+Copyright (c) 1996-1999
+Silicon Graphics Computer Systems, Inc.
+
+Copyright (c) 1994
+Hewlett-Packard Company
+--><!--
+Copyright 2000-2001 University of Notre Dame du Lac.
+Copyright 2001-2002 Indiana University.
+Some concepts based on versions from the MTL draft manual and Boost Graph
+and Property Map documentation:
+Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
+-->
+  <param name="Iter" role="iterator-type"/>
+
+  <use-header name="iterator"/>
+
+  <models-sentence>The iterator type <arg num="1"/> must be a model of <self/>.</models-sentence>
+
+  <description>
+  <para>An input iterator is an iterator that can read through a sequence of
+  values.  It is single-pass (old values of the iterator cannot be
+  re-used), and read-only.</para>
+
+  <para>An input iterator represents a position in a sequence.  Therefore, the
+  iterator can point into the sequence (returning a value when dereferenced
+  and being incrementable), or be off-the-end (and not dereferenceable or
+  incrementable).</para>
+  </description>
+
+  <refines const="no" concept="Assignable"/>
+  <refines const="no" concept="DefaultConstructible"/>
+  <refines const="no" concept="EqualityComparable"/>
+
+  <notation variables="i j">
+    <sample-value>
+      <type name="Iter"/>
+    </sample-value>
+  </notation>
+
+  <associated-type name="value_type">
+    <get-member-type name="value_type">
+      <apply-template name="std::iterator_traits">
+	<type name="Iter"/>
+      </apply-template>
+    </get-member-type>
+    <description><simpara>The value type of the iterator (not necessarily what
+    <code>*i</code> returns)</simpara></description>
+  </associated-type>
+
+  <associated-type name="difference_type">
+    <get-member-type name="difference_type">
+      <apply-template name="std::iterator_traits">
+	<type name="Iter"/>
+      </apply-template>
+    </get-member-type>
+    <description><simpara>The difference type of the iterator</simpara></description>
+  </associated-type>
+
+  <associated-type name="category">
+    <get-member-type name="iterator_category">
+      <apply-template name="std::iterator_traits">
+	<type name="Iter"/>
+      </apply-template>
+    </get-member-type>
+    <description><simpara>The category of the iterator</simpara></description>
+  </associated-type>
+
+  <notation variables="x">
+    <sample-value>
+      <type name="value_type"/>
+    </sample-value>
+  </notation>
+
+  <valid-type-expression name="Category tag">
+    <description/>
+    <type name="category"/>
+    <return-type>
+      <derived-from testable="yes">
+	<type name="std::input_iterator_tag"/>
+      </derived-from>
+      <models-as-first-arg const="no" testable="yes" concept="DefaultConstructible"/>
+      <models-as-first-arg const="no" testable="yes" concept="CopyConstructible"/>
+    </return-type>
+  </valid-type-expression>
+
+  <valid-type-expression name="Value type copy constructibility">
+    <description/>
+    <type name="value_type"/>
+    <return-type>
+      <models-as-first-arg const="no" testable="yes" concept="CopyConstructible"/>
+    </return-type>
+  </valid-type-expression>
+
+  <valid-type-expression name="Difference type properties">
+    <description/>
+    <type name="difference_type"/>
+    <return-type>
+      <models-as-first-arg const="no" testable="yes" concept="SignedInteger"/>
+    </return-type>
+  </valid-type-expression>
+
+  <valid-expression name="Dereference">
+    <dereference>
+      <sample-value><type name="Iter"/></sample-value>
+    </dereference>
+    <return-type>
+      <convertible-to testable="yes"><type name="value_type"/></convertible-to>
+    </return-type>
+    <precondition><code>i</code> is incrementable (not
+    off-the-end)</precondition>
+  </valid-expression>
+
+  <valid-expression name="Preincrement">
+    <preincrement>
+      <sample-value><reference-to><type name="Iter"/></reference-to></sample-value>
+    </preincrement>
+    <return-type>
+      <require-same-type testable="yes">
+	<reference-to><type name="Iter"/></reference-to>
+      </require-same-type>
+    </return-type>
+    <precondition><code>i</code> is incrementable (not
+    off-the-end)</precondition>
+  </valid-expression>
+
+  <valid-expression name="Postincrement">
+    <postincrement>
+      <sample-value><reference-to><type name="Iter"/></reference-to></sample-value>
+    </postincrement>
+    <return-type/>
+    <precondition><code>i</code> is incrementable (not
+    off-the-end)</precondition>
+    <semantics>Equivalent to <code>(void)(++i)</code></semantics>
+    <postcondition><code>i</code> is dereferenceable or
+    off-the-end</postcondition>
+  </valid-expression>
+
+  <valid-expression name="Postincrement and dereference">
+    <dereference>
+      <postincrement>
+	<sample-value><reference-to><type name="Iter"/></reference-to></sample-value>
+      </postincrement>
+    </dereference>
+    <return-type>
+      <convertible-to testable="yes"><type name="value_type"/></convertible-to>
+    </return-type>
+    <precondition><code>i</code> is incrementable (not
+    off-the-end)</precondition>
+    <semantics>Equivalent to <code>{value_type t = *i; ++i; return t;}</code></semantics>
+    <postcondition><code>i</code> is dereferenceable or
+    off-the-end</postcondition>
+  </valid-expression>
+
+  <complexity>
+  All iterator operations must take amortized constant time.
+  </complexity>
+
+  <example-model>
+    <type name="std::istream_iterator"/>
+  </example-model>
+
+  <see-also concept="OutputIterator"/>
+  <see-also concept="ForwardIterator"/>
+
+</concept>
diff --git a/doc/reference/LessThanComparable.xml b/doc/reference/LessThanComparable.xml
new file mode 100644
index 0000000..97f4c46
--- /dev/null
+++ b/doc/reference/LessThanComparable.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<concept name="LessThanComparable" category="Utility"><!--
+Based on concepts from the SGI Standard Template Library documentation:
+Copyright (c) 1996-1999
+Silicon Graphics Computer Systems, Inc.
+
+Copyright (c) 1994
+Hewlett-Packard Company
+--><!--
+Copyright 2000-2001 University of Notre Dame du Lac.
+Copyright 2001-2002 Indiana University.
+Some concepts based on versions from the MTL draft manual and Boost Graph
+and Property Map documentation:
+Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
+-->
+  <param name="X" role="comparable-type"/>
+
+  <models-sentence>The type <arg num="1"/> must be a model of <self/>.</models-sentence>
+
+  <description><para>LessThanComparable types must have <code>&lt;</code>,
+  <code>&gt;</code>, <code>&lt;=</code>, and <code>&gt;=</code>
+  operators.</para></description>
+
+  <notation variables="x y"><sample-value><type name="X"/></sample-value></notation>
+
+  <valid-expression name="Less than">
+    <less-than>
+      <sample-value><type name="X"/></sample-value>
+      <sample-value><type name="X"/></sample-value>
+    </less-than>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="bool"/>
+      </convertible-to>
+    </return-type>
+    <semantics>Determine if one value is less than another.</semantics>
+  </valid-expression>
+
+  <valid-expression name="Less than or equal">
+    <less-than-or-equal>
+      <sample-value><type name="X"/></sample-value>
+      <sample-value><type name="X"/></sample-value>
+    </less-than-or-equal>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="bool"/>
+      </convertible-to>
+    </return-type>
+    <semantics>Determine if one value is less than or equal to another.</semantics>
+  </valid-expression>
+
+  <valid-expression name="Greater than">
+    <greater-than>
+      <sample-value><type name="X"/></sample-value>
+      <sample-value><type name="X"/></sample-value>
+    </greater-than>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="bool"/>
+      </convertible-to>
+    </return-type>
+    <semantics>Determine if one value is greater than another.</semantics>
+  </valid-expression>
+
+  <valid-expression name="Greater than or equal to">
+    <greater-than-or-equal>
+      <sample-value><type name="X"/></sample-value>
+      <sample-value><type name="X"/></sample-value>
+    </greater-than-or-equal>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="bool"/>
+      </convertible-to>
+    </return-type>
+    <semantics>Determine if one value is greater than or equal to another.</semantics>
+  </valid-expression>
+
+  <example-model>
+    <type name="int"/>
+  </example-model>
+</concept>
diff --git a/doc/reference/OutputIterator.xml b/doc/reference/OutputIterator.xml
new file mode 100644
index 0000000..d3f8062
--- /dev/null
+++ b/doc/reference/OutputIterator.xml
@@ -0,0 +1,203 @@
+<?xml version="1.0"?>
+<concept name="OutputIterator" category="Iterator"><!--
+Based on concepts from the SGI Standard Template Library documentation:
+Copyright (c) 1996-1999
+Silicon Graphics Computer Systems, Inc.
+
+Copyright (c) 1994
+Hewlett-Packard Company
+--><!--
+Copyright 2000-2001 University of Notre Dame du Lac.
+Copyright 2001-2002 Indiana University.
+Some concepts based on versions from the MTL draft manual and Boost Graph
+and Property Map documentation:
+Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
+-->
+  <param name="Iter" role="iterator-type"/>
+  <param name="ValueType" role="value-type"/>
+
+  <use-header name="iterator"/>
+
+  <models-sentence>The iterator type <arg num="1"/> (with value type <arg num="2"/>) must be a model of <self/>.</models-sentence>
+
+  <description>
+  <para>An output iterator is an iterator that can write a sequence of
+  values.  It is single-pass (old values of the iterator cannot be
+  re-used), and write-only.</para>
+
+  <para>An output iterator represents a position in a (possibly infinite)
+  sequence.  Therefore, the iterator can point into the sequence (returning
+  a value when dereferenced and being incrementable), or be off-the-end
+  (and not dereferenceable or incrementable).</para>
+  </description>
+
+  <models const="no" testable="yes" concept="Assignable">
+    <type name="Iter"/>
+  </models>
+
+  <models const="no" testable="yes" concept="Assignable">
+    <type name="ValueType"/>
+  </models>
+
+  <models const="no" testable="yes" concept="DefaultConstructible">
+    <type name="Iter"/>
+  </models>
+
+  <models const="no" testable="yes" concept="EqualityComparable">
+    <type name="Iter"/>
+  </models>
+
+  <associated-type name="value_type">
+    <get-member-type name="value_type">
+      <apply-template name="std::iterator_traits">
+	<type name="Iter"/>
+      </apply-template>
+    </get-member-type>
+    <description><simpara>The stated value type of the iterator (should be
+    <code>void</code> for an output iterator that does not model some other
+    iterator concept).</simpara></description>
+  </associated-type>
+
+  <associated-type name="difference_type">
+    <get-member-type name="difference_type">
+      <apply-template name="std::iterator_traits">
+	<type name="Iter"/>
+      </apply-template>
+    </get-member-type>
+    <description><simpara>The difference type of the iterator</simpara></description>
+  </associated-type>
+
+  <associated-type name="category">
+    <get-member-type name="iterator_category">
+      <apply-template name="std::iterator_traits">
+	<type name="Iter"/>
+      </apply-template>
+    </get-member-type>
+    <description><simpara>The category of the iterator</simpara></description>
+  </associated-type>
+
+  <notation variables="i j">
+    <sample-value>
+      <type name="Iter"/>
+    </sample-value>
+  </notation>
+
+  <notation variables="x">
+    <sample-value>
+      <type name="ValueType"/>
+    </sample-value>
+  </notation>
+
+  <valid-type-expression name="Category tag">
+    <description/>
+    <type name="category"/>
+    <return-type>
+      <derived-from testable="yes">
+	<type name="std::output_iterator_tag"/>
+      </derived-from>
+      <models-as-first-arg const="no" testable="yes" concept="DefaultConstructible"/>
+      <models-as-first-arg const="no" testable="yes" concept="CopyConstructible"/>
+    </return-type>
+  </valid-type-expression>
+
+  <valid-type-expression name="Difference type properties">
+    <description/>
+    <type name="difference_type"/>
+    <return-type>
+      <models-as-first-arg const="no" testable="yes" concept="SignedInteger"/>
+    </return-type>
+  </valid-type-expression>
+
+  <valid-expression name="Dereference">
+    <dereference>
+      <sample-value><type name="Iter"/></sample-value>
+    </dereference>
+    <return-type/>
+    <precondition><code>i</code> is incrementable (not
+    off-the-end)</precondition>
+  </valid-expression>
+
+  <valid-expression name="Dereference and assign">
+    <assign>
+      <dereference>
+	<sample-value><type name="Iter"/></sample-value>
+      </dereference>
+      <sample-value><const><reference-to><type name="ValueType"/></reference-to></const></sample-value>
+    </assign>
+    <return-type/>
+    <precondition><code>i</code> is incrementable (not
+    off-the-end)</precondition>
+    <postcondition><code>*i</code> may not be written to again until it has
+    been incremented.</postcondition>
+  </valid-expression>
+
+  <valid-expression name="Preincrement">
+    <preincrement>
+      <sample-value><reference-to><type name="Iter"/></reference-to></sample-value>
+    </preincrement>
+    <return-type>
+      <require-same-type testable="yes">
+	<reference-to><type name="Iter"/></reference-to>
+      </require-same-type>
+    </return-type>
+    <precondition><code>i</code> is incrementable (not
+    off-the-end)</precondition>
+  </valid-expression>
+
+  <valid-expression name="Postincrement">
+    <postincrement>
+      <sample-value><reference-to><type name="Iter"/></reference-to></sample-value>
+    </postincrement>
+    <return-type/>
+    <precondition><code>i</code> is incrementable (not
+    off-the-end)</precondition>
+    <semantics>Equivalent to <code>(void)(++i)</code></semantics>
+    <postcondition><code>i</code> is dereferenceable or
+    off-the-end</postcondition>
+  </valid-expression>
+
+  <valid-expression name="Postincrement, dereference, and assign">
+    <assign>
+      <dereference>
+	<postincrement>
+	  <sample-value><reference-to><type name="Iter"/></reference-to></sample-value>
+	</postincrement>
+      </dereference>
+      <sample-value><const><reference-to><type name="ValueType"/></reference-to></const></sample-value>
+    </assign>
+    <return-type/>
+    <precondition><code>i</code> is incrementable (not
+    off-the-end)</precondition>
+    <semantics>Equivalent to <code>{*i = t; ++i;}</code></semantics>
+    <postcondition><code>i</code> is dereferenceable or
+    off-the-end</postcondition>
+  </valid-expression>
+
+  <complexity>
+  All iterator operations must take amortized constant time.
+  </complexity>
+
+  <example-model>
+    <type name="std::ostream_iterator"/>
+    <type name="..."/>
+  </example-model>
+
+  <example-model>
+    <type name="std::insert_iterator"/>
+    <type name="..."/>
+  </example-model>
+
+  <example-model>
+    <type name="std::front_insert_iterator"/>
+    <type name="..."/>
+  </example-model>
+
+  <example-model>
+    <type name="std::back_insert_iterator"/>
+    <type name="..."/>
+  </example-model>
+
+  <see-also concept="InputIterator"/>
+  <see-also concept="ForwardIterator"/>
+
+</concept>
diff --git a/doc/reference/RandomAccessIterator.xml b/doc/reference/RandomAccessIterator.xml
new file mode 100644
index 0000000..f77f8fd
--- /dev/null
+++ b/doc/reference/RandomAccessIterator.xml
@@ -0,0 +1,313 @@
+<?xml version="1.0"?>
+<concept name="RandomAccessIterator" category="Iterator"><!--
+Based on concepts from the SGI Standard Template Library documentation:
+Copyright (c) 1996-1999
+Silicon Graphics Computer Systems, Inc.
+
+Copyright (c) 1994
+Hewlett-Packard Company
+--><!--
+Copyright 2000-2001 University of Notre Dame du Lac.
+Copyright 2001-2002 Indiana University.
+Some concepts based on versions from the MTL draft manual and Boost Graph
+and Property Map documentation:
+Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
+-->
+  <param name="Iter" role="iterator-type"/>
+
+  <use-header name="iterator"/>
+
+  <models-sentence>The iterator type <arg num="1"/> must be a model of <self/>.</models-sentence>
+
+  <description>
+  <para>A random access iterator is an iterator that can read through
+  a sequence of values.  It can move in either direction through the
+  sequence (by any amount in constant time), and can be either mutable
+  (data pointed to by it can be changed) or not mutable.</para>
+
+  <para>An iterator represents a position in a sequence.  Therefore,
+  the iterator can point into the sequence (returning a value when
+  dereferenced and being incrementable), or be off-the-end (and not
+  dereferenceable or incrementable).</para>
+  </description>
+
+  <associated-type name="value_type">
+    <get-member-type name="value_type">
+      <apply-template name="std::iterator_traits">
+	<type name="Iter"/>
+      </apply-template>
+    </get-member-type>
+    <description><simpara>The value type of the iterator</simpara></description>
+  </associated-type>
+
+  <refines const="no" concept="BidirectionalIterator"/>
+  <refines const="no" concept="LessThanComparable"/>
+
+  <notation variables="i j">
+    <sample-value>
+      <type name="Iter"/>
+    </sample-value>
+  </notation>
+
+  <associated-type name="category">
+    <get-member-type name="iterator_category">
+      <apply-template name="std::iterator_traits">
+	<type name="Iter"/>
+      </apply-template>
+    </get-member-type>
+    <description><simpara>The category of the iterator</simpara></description>
+  </associated-type>
+
+  <associated-type name="difference_type">
+    <get-member-type name="difference_type">
+      <apply-template name="std::iterator_traits">
+	<type name="Iter"/>
+      </apply-template>
+    </get-member-type>
+    <description><simpara>The difference type of the iterator (measure of the number
+    of steps between two iterators)</simpara></description>
+  </associated-type>
+
+  <notation variables="x">
+    <sample-value>
+      <type name="value_type"/>
+    </sample-value>
+  </notation>
+
+  <notation variables="n">
+    <sample-value>
+      <type name="difference_type"/>
+    </sample-value>
+  </notation>
+
+  <notation variables="int_off">
+    <sample-value>
+      <type name="int"/>
+    </sample-value>
+  </notation>
+
+  <valid-type-expression name="Category tag">
+    <description/>
+    <type name="category"/>
+    <return-type>
+      <derived-from testable="yes">
+	<type name="std::random_access_iterator_tag"/>
+      </derived-from>
+    </return-type>
+  </valid-type-expression>
+
+  <valid-expression name="Motion">
+    <add-assign>
+      <sample-value><reference-to><type name="Iter"/></reference-to></sample-value>
+      <sample-value><type name="difference_type"/></sample-value>
+    </add-assign>
+    <return-type>
+      <require-same-type testable="yes">
+	<reference-to><type name="Iter"/></reference-to>
+      </require-same-type>
+    </return-type>
+    <semantics>Equivalent to applying <code>i++</code> <code>n</code> times
+    if <code>n</code> is positive, applying <code>i--</code>
+    <code>-n</code> times if <code>n</code> is negative, and to a null
+    operation if <code>n</code> is zero.</semantics>
+  </valid-expression>
+
+  <valid-expression name="Motion (with integer offset)">
+    <add-assign>
+      <sample-value><reference-to><type name="Iter"/></reference-to></sample-value>
+      <sample-value><type name="int"/></sample-value>
+    </add-assign>
+    <return-type>
+      <require-same-type testable="yes">
+	<reference-to><type name="Iter"/></reference-to>
+      </require-same-type>
+    </return-type>
+    <semantics>Equivalent to applying <code>i++</code> <code>n</code> times
+    if <code>n</code> is positive, applying <code>i--</code>
+    <code>-n</code> times if <code>n</code> is negative, and to a null
+    operation if <code>n</code> is zero.</semantics>
+  </valid-expression>
+
+  <valid-expression name="Subtractive motion">
+    <subtract-assign>
+      <sample-value><reference-to><type name="Iter"/></reference-to></sample-value>
+      <sample-value><type name="difference_type"/></sample-value>
+    </subtract-assign>
+    <return-type>
+      <require-same-type testable="yes">
+	<reference-to><type name="Iter"/></reference-to>
+      </require-same-type>
+    </return-type>
+    <semantics>Equivalent to <code>i+=(-n)</code></semantics>
+  </valid-expression>
+
+  <valid-expression name="Subtractive motion (with integer offset)">
+    <subtract-assign>
+      <sample-value><reference-to><type name="Iter"/></reference-to></sample-value>
+      <sample-value><type name="int"/></sample-value>
+    </subtract-assign>
+    <return-type>
+      <require-same-type testable="yes">
+	<reference-to><type name="Iter"/></reference-to>
+      </require-same-type>
+    </return-type>
+    <semantics>Equivalent to <code>i+=(-n)</code></semantics>
+  </valid-expression>
+
+  <valid-expression name="Addition">
+    <add>
+      <sample-value><type name="Iter"/></sample-value>
+      <sample-value><type name="difference_type"/></sample-value>
+    </add>
+    <return-type>
+      <require-same-type testable="yes"><type name="Iter"/></require-same-type>
+    </return-type>
+    <semantics>Equivalent to <code>{Iter j = i; j += n; return j;}</code></semantics>
+  </valid-expression>
+
+  <valid-expression name="Addition with integer">
+    <add>
+      <sample-value><type name="Iter"/></sample-value>
+      <sample-value><type name="int"/></sample-value>
+    </add>
+    <return-type>
+      <require-same-type testable="yes"><type name="Iter"/></require-same-type>
+    </return-type>
+    <semantics>Equivalent to <code>{Iter j = i; j += n; return j;}</code></semantics>
+  </valid-expression>
+
+  <valid-expression name="Addition (count first)">
+    <add>
+      <sample-value><type name="difference_type"/></sample-value>
+      <sample-value><type name="Iter"/></sample-value>
+    </add>
+    <return-type>
+      <require-same-type testable="yes"><type name="Iter"/></require-same-type>
+    </return-type>
+    <semantics>Equivalent to <code>i + n</code></semantics>
+  </valid-expression>
+
+  <valid-expression name="Addition with integer (count first)">
+    <add>
+      <sample-value><type name="int"/></sample-value>
+      <sample-value><type name="Iter"/></sample-value>
+    </add>
+    <return-type>
+      <require-same-type testable="yes"><type name="Iter"/></require-same-type>
+    </return-type>
+    <semantics>Equivalent to <code>i + n</code></semantics>
+  </valid-expression>
+
+  <valid-expression name="Subtraction">
+    <subtract>
+      <sample-value><type name="Iter"/></sample-value>
+      <sample-value><type name="difference_type"/></sample-value>
+    </subtract>
+    <return-type>
+      <require-same-type testable="yes"><type name="Iter"/></require-same-type>
+    </return-type>
+    <semantics>Equivalent to <code>i + (-n)</code></semantics>
+  </valid-expression>
+
+  <valid-expression name="Subtraction with integer">
+    <subtract>
+      <sample-value><type name="Iter"/></sample-value>
+      <sample-value><type name="int"/></sample-value>
+    </subtract>
+    <return-type>
+      <require-same-type testable="yes"><type name="Iter"/></require-same-type>
+    </return-type>
+    <semantics>Equivalent to <code>i + (-n)</code></semantics>
+  </valid-expression>
+
+  <valid-expression name="Distance">
+    <subtract>
+      <sample-value><type name="Iter"/></sample-value>
+      <sample-value><type name="Iter"/></sample-value>
+    </subtract>
+    <return-type>
+      <require-same-type testable="yes"><type name="difference_type"/></require-same-type>
+    </return-type>
+    <semantics>The number of times <code>i</code> must be incremented (or
+    decremented if the result is negative) to reach <code>j</code>.  Not
+    defined if <code>j</code> is not reachable from
+    <code>i</code>.</semantics>
+  </valid-expression>
+
+  <valid-expression name="Element access">
+    <subscript>
+      <sample-value><type name="Iter"/></sample-value>
+      <sample-value><type name="difference_type"/></sample-value>
+    </subscript>
+    <return-type>
+      <require-same-type testable="yes">
+	<const-if-not-mutable>
+	  <reference-to>
+	    <type name="value_type"/>
+	  </reference-to>
+	</const-if-not-mutable>
+      </require-same-type>
+    </return-type>
+    <semantics>Equivalent to <code>*(i + n)</code></semantics>
+  </valid-expression>
+
+  <valid-expression name="Element access with integer index">
+    <subscript>
+      <sample-value><type name="Iter"/></sample-value>
+      <sample-value><type name="int"/></sample-value>
+    </subscript>
+    <return-type>
+      <require-same-type testable="yes">
+	<const-if-not-mutable>
+	  <reference-to>
+	    <type name="value_type"/>
+	  </reference-to>
+	</const-if-not-mutable>
+      </require-same-type>
+    </return-type>
+    <semantics>Equivalent to <code>*(i + n)</code></semantics>
+  </valid-expression>
+
+  <complexity>
+  All iterator operations must take amortized constant time.
+  </complexity>
+
+  <example-model>
+    <pointer-to>
+      <type name="T"/>
+    </pointer-to>
+  </example-model>
+
+  <example-model>
+    <get-member-type name="iterator">
+      <apply-template name="std::vector">
+	<type name="T"/>
+      </apply-template>
+    </get-member-type>
+  </example-model>
+
+  <example-model>
+    <get-member-type name="const_iterator">
+      <apply-template name="std::vector">
+	<type name="T"/>
+      </apply-template>
+    </get-member-type>
+  </example-model>
+
+  <example-model>
+    <get-member-type name="iterator">
+      <apply-template name="std::deque">
+	<type name="T"/>
+      </apply-template>
+    </get-member-type>
+  </example-model>
+
+  <example-model>
+    <get-member-type name="const_iterator">
+      <apply-template name="std::deque">
+	<type name="T"/>
+      </apply-template>
+    </get-member-type>
+  </example-model>
+
+</concept>
diff --git a/doc/reference/SignedInteger.xml b/doc/reference/SignedInteger.xml
new file mode 100644
index 0000000..d47693b
--- /dev/null
+++ b/doc/reference/SignedInteger.xml
@@ -0,0 +1,549 @@
+<?xml version="1.0"?>
+<concept name="SignedInteger" category="Utility"><!--
+Based on concepts from the SGI Standard Template Library documentation:
+Copyright (c) 1996-1999
+Silicon Graphics Computer Systems, Inc.
+
+Copyright (c) 1994
+Hewlett-Packard Company
+--><!--
+Copyright 2000-2001 University of Notre Dame du Lac.
+Copyright 2001-2002 Indiana University.
+Some concepts based on versions from the MTL draft manual and Boost Graph
+and Property Map documentation:
+Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
+-->
+  <param name="T" role="integral-type"/>
+
+  <models-sentence>Integer type <arg num="1"/> must be a model of <self/>.</models-sentence>
+
+  <refines const="no" concept="CopyConstructible"/>
+  <refines const="no" concept="Assignable"/>
+  <refines const="no" concept="DefaultConstructible"/>
+  <refines const="no" concept="EqualityComparable"/>
+  <refines const="no" concept="LessThanComparable"/>
+
+  <notation variables="x y z">
+    <sample-value><type name="T"/></sample-value>
+  </notation>
+  <notation variables="a b">
+    <sample-value><type name="int"/></sample-value>
+  </notation>
+
+  <!--
+  <valid-type-expression name="int-ness">
+    <documentation>Should this really be required?</documentation>
+    <type name="T"/>
+    <return-type>
+      <require-same-type>
+	<type name="int"/>
+      </require-same-type>
+    </return-type>
+  </valid-type-expression>
+  -->
+
+  <valid-expression name="Conversion from int">
+    <construct template-parameters="">
+      <type name="T"/>
+      <sample-value><type name="int"/></sample-value>
+    </construct>
+    <return-type><require-same-type testable="yes">
+      <type name="T"/>
+    </require-same-type></return-type>
+  </valid-expression>
+
+  <valid-expression name="Preincrement">
+    <preincrement>
+      <sample-value>
+	<reference-to><type name="T"/></reference-to>
+      </sample-value>
+    </preincrement>
+    <return-type>
+      <require-same-type testable="yes">
+	<reference-to><type name="T"/></reference-to>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Predecrement">
+    <predecrement>
+      <sample-value>
+	<reference-to><type name="T"/></reference-to>
+      </sample-value>
+    </predecrement>
+    <return-type>
+      <require-same-type testable="yes">
+	<reference-to><type name="T"/></reference-to>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Postincrement">
+    <postincrement>
+      <sample-value>
+	<reference-to><type name="T"/></reference-to>
+      </sample-value>
+    </postincrement>
+    <return-type>
+      <require-same-type testable="yes">
+	<type name="T"/>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Postdecrement">
+    <postdecrement>
+      <sample-value>
+	<reference-to><type name="T"/></reference-to>
+      </sample-value>
+    </postdecrement>
+    <return-type>
+      <require-same-type testable="yes">
+	<type name="T"/>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Sum">
+    <add>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+    </add>
+    <return-type>
+      <require-same-type testable="yes">
+	<type name="T"/>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Sum with int">
+    <add>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="int"/>
+      </sample-value>
+    </add>
+    <return-type>
+      <require-same-type testable="yes">
+	<type name="T"/>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Sum-assignment">
+    <add-assign>
+      <sample-value>
+	<reference-to><type name="T"/></reference-to>
+      </sample-value>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+    </add-assign>
+    <return-type>
+      <require-same-type testable="yes">
+	<reference-to><type name="T"/></reference-to>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Sum-assignment with int">
+    <add-assign>
+      <sample-value>
+	<reference-to><type name="T"/></reference-to>
+      </sample-value>
+      <sample-value>
+	<type name="int"/>
+      </sample-value>
+    </add-assign>
+    <return-type>
+      <require-same-type testable="yes">
+	<reference-to><type name="T"/></reference-to>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Difference">
+    <subtract>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+    </subtract>
+    <return-type>
+      <require-same-type testable="yes">
+	<type name="T"/>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Difference with int">
+    <subtract>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="int"/>
+      </sample-value>
+    </subtract>
+    <return-type>
+      <require-same-type testable="yes">
+	<type name="T"/>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Product">
+    <multiply>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+    </multiply>
+    <return-type>
+      <require-same-type testable="yes">
+	<type name="T"/>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Product with int">
+    <multiply>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="int"/>
+      </sample-value>
+    </multiply>
+    <return-type>
+      <require-same-type testable="yes">
+	<type name="T"/>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Product-assignment with int">
+    <multiply-assign>
+      <sample-value>
+	<reference-to><type name="T"/></reference-to>
+      </sample-value>
+      <sample-value>
+	<type name="int"/>
+      </sample-value>
+    </multiply-assign>
+    <return-type>
+      <require-same-type testable="yes">
+	<reference-to><type name="T"/></reference-to>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Product with int on left">
+    <multiply>
+      <sample-value>
+	<type name="int"/>
+      </sample-value>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+    </multiply>
+    <return-type>
+      <require-same-type testable="yes">
+	<type name="T"/>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Quotient">
+    <divide>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+    </divide>
+    <return-type>
+      <require-same-type testable="yes">
+	<type name="T"/>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Quotient with int">
+    <divide>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="int"/>
+      </sample-value>
+    </divide>
+    <return-type>
+      <require-same-type testable="yes">
+	<type name="T"/>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Right-shift">
+    <shift-right>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+    </shift-right>
+    <return-type>
+      <require-same-type testable="yes">
+	<type name="T"/>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Right-shift with int">
+    <shift-right>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="int"/>
+      </sample-value>
+    </shift-right>
+    <return-type>
+      <require-same-type testable="yes">
+	<type name="T"/>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Right-shift-assignment with int">
+    <shift-right-assign>
+      <sample-value>
+	<reference-to><type name="T"/></reference-to>
+      </sample-value>
+      <sample-value>
+	<type name="int"/>
+      </sample-value>
+    </shift-right-assign>
+    <return-type>
+      <require-same-type testable="yes">
+	<reference-to><type name="T"/></reference-to>
+      </require-same-type>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Less-than comparison">
+    <less-than>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+    </less-than>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="bool"/>
+      </convertible-to>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Less-than comparison with int">
+    <less-than>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="int"/>
+      </sample-value>
+    </less-than>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="bool"/>
+      </convertible-to>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Less-than comparison with size_t">
+    <less-than>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="std::size_t"/>
+      </sample-value>
+    </less-than>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="bool"/>
+      </convertible-to>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Greater-than comparison">
+    <greater-than>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+    </greater-than>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="bool"/>
+      </convertible-to>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Greater-than comparison with int">
+    <greater-than>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="int"/>
+      </sample-value>
+    </greater-than>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="bool"/>
+      </convertible-to>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Less-than-or-equal comparison">
+    <less-than-or-equal>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+    </less-than-or-equal>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="bool"/>
+      </convertible-to>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Less-than-or-equal comparison with int">
+    <less-than-or-equal>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="int"/>
+      </sample-value>
+    </less-than-or-equal>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="bool"/>
+      </convertible-to>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Greater-than-or-equal comparison">
+    <greater-than-or-equal>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+    </greater-than-or-equal>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="bool"/>
+      </convertible-to>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Greater-than-or-equal comparison with int">
+    <greater-than-or-equal>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="int"/>
+      </sample-value>
+    </greater-than-or-equal>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="bool"/>
+      </convertible-to>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Greater-than-or-equal comparison with int on left">
+    <greater-than-or-equal>
+      <sample-value>
+	<type name="int"/>
+      </sample-value>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+    </greater-than-or-equal>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="bool"/>
+      </convertible-to>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Equality comparison">
+    <equal-to>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+    </equal-to>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="bool"/>
+      </convertible-to>
+    </return-type>
+  </valid-expression>
+
+  <valid-expression name="Equality comparison with int">
+    <equal-to>
+      <sample-value>
+	<type name="T"/>
+      </sample-value>
+      <sample-value>
+	<type name="int"/>
+      </sample-value>
+    </equal-to>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="bool"/>
+      </convertible-to>
+    </return-type>
+  </valid-expression>
+
+  <valid-type-expression name="Conversion to int">
+    <documentation/>
+    <type name="T"/>
+    <return-type>
+      <convertible-to testable="yes">
+	<type name="int"/>
+      </convertible-to>
+    </return-type>
+  </valid-type-expression>
+
+</concept>
diff --git a/doc/reference/concepts.xml b/doc/reference/concepts.xml
new file mode 100644
index 0000000..ffe32c1
--- /dev/null
+++ b/doc/reference/concepts.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library-reference PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+  "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<library-reference id="concepts.reference" 
+         xmlns:xi="http://www.w3.org/2001/XInclude" 
+         last-revision="$Date$">
+  <sectioninfo>
+    <copyright>
+      <year>2001</year>
+      <year>2002</year>
+      <holder>Indiana University</holder>
+    </copyright>
+
+    <copyright>
+      <year>2000</year>
+      <year>2001</year>
+      <holder>University of Notre Dame du Lac</holder>
+    </copyright>
+
+    <copyright>
+      <year>2000</year>
+      <holder>Jeremy Siek</holder>
+      <holder>Lie-Quan Lee</holder>
+      <holder>Andrew Lumsdaine</holder>
+    </copyright>
+
+    <copyright>
+      <year>1996</year>
+      <year>1997</year>
+      <year>1998</year>
+      <year>1999</year>
+      <holder>Silicon Graphics Computer Systems, Inc.</holder>
+    </copyright>
+
+    <copyright>
+      <year>1994</year>
+      <holder>Hewlett-Packard Company</holder>
+    </copyright>
+
+    <legalnotice>
+      <para>Distributed under the Boost Software License, Version 1.0.
+      (See accompanying file <filename>LICENSE_1_0.txt</filename> or copy at 
+      <ulink
+      url="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</ulink>)
+      </para>
+
+      <para>This product includes software developed at the University
+      of Notre Dame and the Pervasive Technology Labs at Indiana
+      University. For technical information contact Andrew Lumsdaine
+      at the Pervasive Technology Labs at Indiana University.  For
+      administrative and license questions contact the Advanced
+      Research and Technology Institute at 351 West 10th Street.
+      Indianapolis, Indiana 46202, phone 317-278-4100, fax
+      317-274-5902.</para>
+
+      <para>Some concepts based on versions from the MTL draft manual
+      and Boost Graph and Property Map documentation, the SGI Standard
+      Template Library documentation and the Hewlett-Packard STL,
+      under the following license: 
+        <blockquote><simpara>Permission to use, copy, modify, distribute and
+        sell this software and its documentation for any purpose is
+        hereby granted without fee, provided that the above copyright
+        notice appears in all copies and that both that copyright
+        notice and this permission notice appear in supporting
+        documentation.  Silicon Graphics makes no representations
+        about the suitability of this software for any purpose.  It is
+        provided "as is" without express or implied
+        warranty.</simpara></blockquote></para>
+    </legalnotice>
+  </sectioninfo>
+  <title>Concept reference</title>
+
+  <xi:include href="Assignable.xml"/>
+  <xi:include href="InputIterator.xml"/>
+  <xi:include href="OutputIterator.xml"/>
+  <xi:include href="ForwardIterator.xml"/>
+  <xi:include href="BidirectionalIterator.xml"/>
+  <xi:include href="RandomAccessIterator.xml"/>
+  <xi:include href="DefaultConstructible.xml"/>
+  <xi:include href="CopyConstructible.xml"/>
+  <xi:include href="EqualityComparable.xml"/>
+  <xi:include href="LessThanComparable.xml"/>
+  <xi:include href="SignedInteger.xml"/>
+</library-reference>