[boost-doc-zh] r359 committed - 加入qbk文件,其中accumulators, any, array, concept_check等4个库的qbk文件已译。

  • From: boost-doc-zh@xxxxxxxxxxxxxx
  • To: boost-doc-zh-notify@xxxxxxxxxxxxx
  • Date: Tue, 29 Dec 2009 07:05:52 +0000

Revision: 359
Author: alai04
Date: Mon Dec 28 23:05:14 2009
Log: 加入qbk文件,其中accumulators, any, array, concept_check等4个库的qbk文 件已译。
http://code.google.com/p/boost-doc-zh/source/detail?r=359

Added:
 /trunk/libs/accumulators/doc
 /trunk/libs/accumulators/doc/Jamfile.v2
 /trunk/libs/accumulators/doc/accumulators.qbk
 /trunk/libs/accumulators/example
 /trunk/libs/accumulators/example/Jamfile.v2
 /trunk/libs/accumulators/example/example.vcproj
 /trunk/libs/accumulators/example/main.cpp
 /trunk/libs/algorithm/string/doc/Jamfile.v2
 /trunk/libs/algorithm/string/doc/concept.xml
 /trunk/libs/algorithm/string/doc/credits.xml
 /trunk/libs/algorithm/string/doc/design.xml
 /trunk/libs/algorithm/string/doc/environment.xml
 /trunk/libs/algorithm/string/doc/intro.xml
 /trunk/libs/algorithm/string/doc/quickref.xml
 /trunk/libs/algorithm/string/doc/rationale.xml
 /trunk/libs/algorithm/string/doc/release_notes.xml
 /trunk/libs/algorithm/string/doc/string_algo.xml
 /trunk/libs/algorithm/string/doc/usage.xml
 /trunk/libs/any/doc
 /trunk/libs/any/doc/any.xml
 /trunk/libs/array/doc
 /trunk/libs/array/doc/array.xml
 /trunk/libs/bind/doc/Jamfile.v2
 /trunk/libs/concept_check/doc
 /trunk/libs/concept_check/doc/Jamfile.v2
 /trunk/libs/concept_check/doc/reference
 /trunk/libs/concept_check/doc/reference/Assignable.xml
 /trunk/libs/concept_check/doc/reference/BidirectionalIterator.xml
 /trunk/libs/concept_check/doc/reference/CopyConstructible.xml
 /trunk/libs/concept_check/doc/reference/DefaultConstructible.xml
 /trunk/libs/concept_check/doc/reference/EqualityComparable.xml
 /trunk/libs/concept_check/doc/reference/ForwardIterator.xml
 /trunk/libs/concept_check/doc/reference/InputIterator.xml
 /trunk/libs/concept_check/doc/reference/LessThanComparable.xml
 /trunk/libs/concept_check/doc/reference/OutputIterator.xml
 /trunk/libs/concept_check/doc/reference/RandomAccessIterator.xml
 /trunk/libs/concept_check/doc/reference/SignedInteger.xml
 /trunk/libs/concept_check/doc/reference/concepts.xml
 /trunk/libs/date_time/xmldoc/Jamfile.v2
 /trunk/libs/date_time/xmldoc/README
 /trunk/libs/date_time/xmldoc/acknowledgements.xml
 /trunk/libs/date_time/xmldoc/buildinfo.xml
 /trunk/libs/date_time/xmldoc/calculations.xml
 /trunk/libs/date_time/xmldoc/changes.xml
 /trunk/libs/date_time/xmldoc/conceptual.xml
 /trunk/libs/date_time/xmldoc/custom_time_zone.xml
 /trunk/libs/date_time/xmldoc/date_algorithms.xml
 /trunk/libs/date_time/xmldoc/date_class.xml
 /trunk/libs/date_time/xmldoc/date_duration.xml
 /trunk/libs/date_time/xmldoc/date_facet.xml
 /trunk/libs/date_time/xmldoc/date_input_facet.xml
 /trunk/libs/date_time/xmldoc/date_iterators.xml
 /trunk/libs/date_time/xmldoc/date_period.xml
 /trunk/libs/date_time/xmldoc/date_time.xml
 /trunk/libs/date_time/xmldoc/date_time_fo_stylesheet.xsl
 /trunk/libs/date_time/xmldoc/date_time_io.xml
 /trunk/libs/date_time/xmldoc/design_concepts.xml
 /trunk/libs/date_time/xmldoc/design_goals.xml
 /trunk/libs/date_time/xmldoc/details.xml
 /trunk/libs/date_time/xmldoc/domain_concepts.xml
 /trunk/libs/date_time/xmldoc/doxy.xml
 /trunk/libs/date_time/xmldoc/ex_calc_rules.xml
 /trunk/libs/date_time/xmldoc/ex_date_period_calc.xml
 /trunk/libs/date_time/xmldoc/ex_dates_as_strings.xml
 /trunk/libs/date_time/xmldoc/ex_days_alive.xml
 /trunk/libs/date_time/xmldoc/ex_days_between_new_years.xml
 /trunk/libs/date_time/xmldoc/ex_end_of_month_day.xml
 /trunk/libs/date_time/xmldoc/ex_find_last_day_of_months.xml
 /trunk/libs/date_time/xmldoc/ex_flight.xml
 /trunk/libs/date_time/xmldoc/ex_local_utc_conversion.xml
 /trunk/libs/date_time/xmldoc/ex_localization.xml
 /trunk/libs/date_time/xmldoc/ex_meeting_planner.xml
 /trunk/libs/date_time/xmldoc/ex_month_add.xml
 /trunk/libs/date_time/xmldoc/ex_print_holidays.xml
 /trunk/libs/date_time/xmldoc/ex_print_hours.xml
 /trunk/libs/date_time/xmldoc/ex_print_month.xml
 /trunk/libs/date_time/xmldoc/ex_seconds_since_epoch.xml
 /trunk/libs/date_time/xmldoc/ex_simple_time_zone.xml
 /trunk/libs/date_time/xmldoc/ex_time_math.xml
 /trunk/libs/date_time/xmldoc/ex_time_periods.xml
 /trunk/libs/date_time/xmldoc/examples.xml
 /trunk/libs/date_time/xmldoc/exclusive_date_time.xml
 /trunk/libs/date_time/xmldoc/format_flags.xml
 /trunk/libs/date_time/xmldoc/gregorian.xml
 /trunk/libs/date_time/xmldoc/gregorian_calendar.xml
 /trunk/libs/date_time/xmldoc/io_objects.xml
 /trunk/libs/date_time/xmldoc/io_tutorial.xml
 /trunk/libs/date_time/xmldoc/license.xml
 /trunk/libs/date_time/xmldoc/local_date_time.xml
 /trunk/libs/date_time/xmldoc/local_time.xml
 /trunk/libs/date_time/xmldoc/local_time_period.xml
 /trunk/libs/date_time/xmldoc/motivation.xml
 /trunk/libs/date_time/xmldoc/posix_time.xml
 /trunk/libs/date_time/xmldoc/posix_time_zone.xml
 /trunk/libs/date_time/xmldoc/ptime_class.xml
 /trunk/libs/date_time/xmldoc/ref_tag_fix.pl
 /trunk/libs/date_time/xmldoc/references.xml
 /trunk/libs/date_time/xmldoc/serialization.xml
 /trunk/libs/date_time/xmldoc/snap_to_details.xml
 /trunk/libs/date_time/xmldoc/table_template.xml
 /trunk/libs/date_time/xmldoc/terminology.xml
 /trunk/libs/date_time/xmldoc/tests.xml
 /trunk/libs/date_time/xmldoc/time_duration.xml
 /trunk/libs/date_time/xmldoc/time_facet.xml
 /trunk/libs/date_time/xmldoc/time_input_facet.xml
 /trunk/libs/date_time/xmldoc/time_iterators.xml
 /trunk/libs/date_time/xmldoc/time_period.xml
 /trunk/libs/date_time/xmldoc/time_zone_base.xml
 /trunk/libs/date_time/xmldoc/tradeoffs.xml
 /trunk/libs/date_time/xmldoc/tz_database.xml
 /trunk/libs/date_time/xmldoc/usage_examples.xml
 /trunk/libs/foreach/doc
 /trunk/libs/foreach/doc/Jamfile.v2
 /trunk/libs/foreach/doc/foreach.qbk
 /trunk/libs/function/doc
 /trunk/libs/function/doc/Jamfile.v2
 /trunk/libs/function/doc/faq.xml
 /trunk/libs/function/doc/function.xml
 /trunk/libs/function/doc/history.xml
 /trunk/libs/function/doc/html
 /trunk/libs/function/doc/html/boost
 /trunk/libs/function/doc/html/boost/bad_function_call.html
 /trunk/libs/function/doc/html/boost/function
 /trunk/libs/function/doc/html/boost/function/sig.html
 /trunk/libs/function/doc/html/boost/function.html
 /trunk/libs/function/doc/html/boost/functionN
 /trunk/libs/function/doc/html/boost/functionN/sig.html
 /trunk/libs/function/doc/html/boost/functionN.html
 /trunk/libs/function/doc/html/boost/function_base.html
 /trunk/libs/function/doc/html/boost/function_equal.html
 /trunk/libs/function/doc/html/function
 /trunk/libs/function/doc/html/function/faq.html
 /trunk/libs/function/doc/html/function/history.html
 /trunk/libs/function/doc/html/function/misc.html
 /trunk/libs/function/doc/html/function/reference.html
 /trunk/libs/function/doc/html/function/testsuite.html
 /trunk/libs/function/doc/html/function/tutorial.html
 /trunk/libs/function/doc/html/function-doc_HTML.manifest
 /trunk/libs/function/doc/html/index.html
 /trunk/libs/function/doc/misc.xml
 /trunk/libs/function/doc/reference.xml
 /trunk/libs/function/doc/tests.xml
 /trunk/libs/function/doc/tutorial.xml
 /trunk/libs/functional/hash/doc
 /trunk/libs/functional/hash/doc/Jamfile.v2
 /trunk/libs/functional/hash/doc/changes.qbk
 /trunk/libs/functional/hash/doc/disable.qbk
 /trunk/libs/functional/hash/doc/hash.qbk
 /trunk/libs/functional/hash/doc/intro.qbk
 /trunk/libs/functional/hash/doc/links.qbk
 /trunk/libs/functional/hash/doc/portability.qbk
 /trunk/libs/functional/hash/doc/ref.xml
 /trunk/libs/functional/hash/doc/thanks.qbk
 /trunk/libs/functional/hash/doc/tutorial.qbk
 /trunk/libs/interprocess/doc/Jamfile.v2
 /trunk/libs/interprocess/doc/interprocess.qbk
 /trunk/libs/intrusive/doc/Jamfile.v2
 /trunk/libs/intrusive/doc/intrusive.qbk
 /trunk/libs/lambda/doc/Jamfile.v2
 /trunk/libs/lambda/doc/lambda.xml
 /trunk/libs/mpi/doc/Jamfile.v2
 /trunk/libs/mpi/doc/mpi.qbk
 /trunk/libs/program_options/doc/Jamfile.v2
 /trunk/libs/program_options/doc/acknowledgements.xml
 /trunk/libs/program_options/doc/alternatives
 /trunk/libs/program_options/doc/changes.xml
 /trunk/libs/program_options/doc/design.xml
 /trunk/libs/program_options/doc/glossary.dox
 /trunk/libs/program_options/doc/glossary.xml
 /trunk/libs/program_options/doc/howto.xml
 /trunk/libs/program_options/doc/overview.xml
 /trunk/libs/program_options/doc/post_review_plan.txt
 /trunk/libs/program_options/doc/program_options.dox
 /trunk/libs/program_options/doc/program_options.ent
 /trunk/libs/program_options/doc/program_options.xml
 /trunk/libs/program_options/doc/questions
 /trunk/libs/program_options/doc/questions.dox
 /trunk/libs/program_options/doc/rationale
 /trunk/libs/program_options/doc/rationale.dox
 /trunk/libs/program_options/doc/recipes.dox
 /trunk/libs/program_options/doc/requirements-Rozental
 /trunk/libs/program_options/doc/todo.txt
 /trunk/libs/program_options/doc/tutorial.xml
 /trunk/libs/proto/doc/Jamfile.v2
 /trunk/libs/proto/doc/acknowledgements.qbk
 /trunk/libs/proto/doc/back_end.qbk
 /trunk/libs/proto/doc/calculator.qbk
 /trunk/libs/proto/doc/conventions.qbk
 /trunk/libs/proto/doc/examples.qbk
 /trunk/libs/proto/doc/front_end.qbk
 /trunk/libs/proto/doc/getting_started.qbk
 /trunk/libs/proto/doc/glossary.qbk
 /trunk/libs/proto/doc/hello_world.qbk
 /trunk/libs/proto/doc/history.qbk
 /trunk/libs/proto/doc/implementation.qbk
 /trunk/libs/proto/doc/installation.qbk
 /trunk/libs/proto/doc/intermediate_form.qbk
 /trunk/libs/proto/doc/preface.qbk
 /trunk/libs/proto/doc/propdocs.sh
 /trunk/libs/proto/doc/proto.qbk
 /trunk/libs/proto/doc/rationale.qbk
 /trunk/libs/proto/doc/resources.qbk
 /trunk/libs/signals/doc/Jamfile.v2
 /trunk/libs/signals/doc/design.xml
 /trunk/libs/signals/doc/faq.xml
 /trunk/libs/signals/doc/introduction.xml
 /trunk/libs/signals/doc/rationale.xml
 /trunk/libs/signals/doc/signals.xml
 /trunk/libs/signals/doc/tests.xml
 /trunk/libs/signals/doc/tutorial.xml
 /trunk/libs/signals2/doc/Jamfile.v2
 /trunk/libs/static_assert/doc
 /trunk/libs/static_assert/doc/Jamfile.v2
 /trunk/libs/static_assert/doc/static_assert.qbk
 /trunk/libs/thread/doc/Jamfile.v2
 /trunk/libs/thread/doc/acknowledgements.qbk
 /trunk/libs/thread/doc/barrier.qbk
 /trunk/libs/thread/doc/changes.qbk
 /trunk/libs/thread/doc/condition_variables.qbk
 /trunk/libs/thread/doc/future_ref.qbk
 /trunk/libs/thread/doc/futures.qbk
 /trunk/libs/thread/doc/mutex_concepts.qbk
 /trunk/libs/thread/doc/mutexes.qbk
 /trunk/libs/thread/doc/once.qbk
 /trunk/libs/thread/doc/overview.qbk
 /trunk/libs/thread/doc/shared_mutex_ref.qbk
 /trunk/libs/thread/doc/thread.qbk
 /trunk/libs/thread/doc/thread_ref.qbk
 /trunk/libs/thread/doc/time.qbk
 /trunk/libs/thread/doc/tss.qbk
 /trunk/libs/tr1/doc
 /trunk/libs/tr1/doc/Jamfile.v2
 /trunk/libs/tr1/doc/tr1.qbk
 /trunk/libs/typeof/doc
 /trunk/libs/typeof/doc/Jamfile.v2
 /trunk/libs/typeof/doc/typeof.qbk
 /trunk/libs/units/doc
 /trunk/libs/units/doc/Jamfile.v2
 /trunk/libs/units/doc/units.qbk
 /trunk/libs/unordered/doc/Jamfile.v2
 /trunk/libs/unordered/doc/buckets.qbk
 /trunk/libs/unordered/doc/changes.qbk
 /trunk/libs/unordered/doc/comparison.qbk
 /trunk/libs/unordered/doc/hash_equality.qbk
 /trunk/libs/unordered/doc/intro.qbk
 /trunk/libs/unordered/doc/rationale.qbk
 /trunk/libs/unordered/doc/unordered.qbk
 /trunk/libs/variant/doc
 /trunk/libs/variant/doc/Jamfile.v2
 /trunk/libs/variant/doc/biblio.xml
 /trunk/libs/variant/doc/design.xml
 /trunk/libs/variant/doc/introduction.xml
 /trunk/libs/variant/doc/misc.xml
 /trunk/libs/variant/doc/reference
 /trunk/libs/variant/doc/reference/apply_visitor.xml
 /trunk/libs/variant/doc/reference/bad_visit.xml
 /trunk/libs/variant/doc/reference/concepts.xml
 /trunk/libs/variant/doc/reference/get.xml
 /trunk/libs/variant/doc/reference/recursive_variant.xml
 /trunk/libs/variant/doc/reference/recursive_wrapper.xml
 /trunk/libs/variant/doc/reference/reference.xml
 /trunk/libs/variant/doc/reference/static_visitor.xml
 /trunk/libs/variant/doc/reference/variant.xml
 /trunk/libs/variant/doc/reference/variant_fwd.xml
 /trunk/libs/variant/doc/reference/visitor_ptr.xml
 /trunk/libs/variant/doc/tutorial
 /trunk/libs/variant/doc/tutorial/advanced.xml
 /trunk/libs/variant/doc/tutorial/basic.xml
 /trunk/libs/variant/doc/tutorial/tutorial.xml
 /trunk/libs/variant/doc/variant.xml
 /trunk/libs/xpressive/doc
 /trunk/libs/xpressive/doc/Jamfile.v2
 /trunk/libs/xpressive/doc/acknowledgements.qbk
 /trunk/libs/xpressive/doc/actions.qbk
 /trunk/libs/xpressive/doc/concepts.qbk
 /trunk/libs/xpressive/doc/dynamic_regexes.qbk
 /trunk/libs/xpressive/doc/examples.qbk
 /trunk/libs/xpressive/doc/grammars.qbk
 /trunk/libs/xpressive/doc/history.qbk
 /trunk/libs/xpressive/doc/installation.qbk
 /trunk/libs/xpressive/doc/introduction.qbk
 /trunk/libs/xpressive/doc/matching.qbk
 /trunk/libs/xpressive/doc/named_captures.qbk
 /trunk/libs/xpressive/doc/nyi.qbk
 /trunk/libs/xpressive/doc/perf.qbk
 /trunk/libs/xpressive/doc/preface.qbk
 /trunk/libs/xpressive/doc/quick_start.qbk
 /trunk/libs/xpressive/doc/regexpp_diffs.qbk
 /trunk/libs/xpressive/doc/results.qbk
 /trunk/libs/xpressive/doc/static_regexes.qbk
 /trunk/libs/xpressive/doc/substitutions.qbk
 /trunk/libs/xpressive/doc/symbols.qbk
 /trunk/libs/xpressive/doc/tips_n_tricks.qbk
 /trunk/libs/xpressive/doc/tokenization.qbk
 /trunk/libs/xpressive/doc/tracking_ptr.qbk
 /trunk/libs/xpressive/doc/traits.qbk
 /trunk/libs/xpressive/doc/xpressive.qbk
 /trunk/tools/boostbook/doc
 /trunk/tools/boostbook/doc/Jamfile.v2
 /trunk/tools/boostbook/doc/boostbook.xml
 /trunk/tools/boostbook/doc/documenting.xml
 /trunk/tools/boostbook/doc/reference.dtdxml
 /trunk/tools/boostbook/doc/reference.xml
 /trunk/tools/boostbook/doc/together.xml
 /trunk/tools/build/v2/doc/jamfile.jam
 /trunk/tools/build/v2/doc/src
 /trunk/tools/build/v2/doc/src/architecture.xml
 /trunk/tools/build/v2/doc/src/catalog.xml
 /trunk/tools/build/v2/doc/src/extending.xml
 /trunk/tools/build/v2/doc/src/faq.xml
 /trunk/tools/build/v2/doc/src/fragments.xml
 /trunk/tools/build/v2/doc/src/howto.xml
 /trunk/tools/build/v2/doc/src/install.xml
 /trunk/tools/build/v2/doc/src/overview.xml
 /trunk/tools/build/v2/doc/src/recipes.xml
 /trunk/tools/build/v2/doc/src/reference.xml
 /trunk/tools/build/v2/doc/src/standalone.xml
 /trunk/tools/build/v2/doc/src/tasks.xml
 /trunk/tools/build/v2/doc/src/tutorial.xml
 /trunk/tools/build/v2/doc/src/userman.xml
 /trunk/tools/build/v2/doc/src/v1_vs_v2.xml
 /trunk/tools/jam/doc
 /trunk/tools/jam/doc/bjam.qbk
 /trunk/tools/jam/doc/build.jam
 /trunk/tools/jam/doc/history.qbk
 /trunk/tools/quickbook/doc/Jamfile.v2
 /trunk/tools/quickbook/doc/quickbook.qbk
Deleted:
 /trunk/libs/spirit/doc/html/images/callouts/Thumbs.db
Modified:
 /trunk/libs/property_tree/doc/property_tree.qbk

=======================================
--- /dev/null
+++ /trunk/libs/accumulators/doc/Jamfile.v2     Mon Dec 28 23:05:14 2009
@@ -0,0 +1,248 @@
+# Copyright Eric Niebler 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)
+
+import os ;
+import common ;
+import doxygen ;
+import quickbook ;
+
+#
+# Accumulators docs are dependent upon
+# latex dvips and ps being in your PATH.
+# This is true for most Unix installs, but
+# not on Win32, where you will need to install
+# MkTex and Ghostscript and add these tools
+# to your path.
+#
+make latex.check : : @check-latex ;
+actions check-latex
+{
+    latex -version > latex.version
+}
+
+make dvips.check : : @check-dvips ;
+actions check-dvips
+{
+    dvips -version > dvips.version
+}
+
+make gs.check : : @check-gs ;
+
+import os ;
+
+if [ os.name ] = "NT"
+{
+   actions check-gs
+   {
+       gswin32c -version > gs.version
+   }
+}
+else
+{
+   actions check-gs
+   {
+       gs -version > gs.version
+   }
+}
+
+# Use Doxygen to emit a tagfile with the definition of depends_on<>. That
+# tagfile will be used by Doxygen below when generating the Statistics Library +# Reference. This is all so that the Doxygen-generated documentation for the
+# features shows the dependency relationships between them.
+doxygen tagfile
+    :
+        ../../../boost/accumulators/framework/depends_on.hpp
+        ../../../boost/accumulators/framework/extractor.hpp
+    :
+        <doxygen:param>MACRO_EXPANSION=YES
+        <doxygen:param>EXPAND_ONLY_PREDEF=YES
+        <doxygen:param>GENERATE_TAGFILE=accumulators.tag
+ <doxygen:param>"PREDEFINED=\"BOOST_ACCUMULATORS_DOXYGEN_INVOKED=1\" \\
+                                   \"BOOST_PP_REPEAT_FROM_TO(a,b,c,d)=\" \\
+ \"BOOST_PP_ENUM_PARAMS(a,b)=b ## 1, b ## 2, ...\""
+        <dependency>latex.check
+        <dependency>dvips.check
+        <dependency>gs.check
+    ;
+
+doxygen accdoc
+    :
+        [ glob ../../../boost/accumulators/accumulators*.hpp ]
+        [ glob ../../../boost/accumulators/framework/*.hpp ]
+        [ glob ../../../boost/accumulators/framework/parameters/*.hpp ]
+        [ glob ../../../boost/accumulators/framework/accumulators/*.hpp ]
+    :
+        <doxygen:param>EXTRACT_ALL=YES
+ <doxygen:param>"PREDEFINED=\"BOOST_ACCUMULATORS_DOXYGEN_INVOKED=1\" \\
+                                   \"BOOST_PP_REPEAT_FROM_TO(a,b,c,d)=\" \\
+                                   \"BOOST_PP_REPEAT(a,b,c)=\" \\
+                                   \"BOOST_PARAMETER_KEYWORD(a,b)=\\
+                                         namespace a { struct b {}; } \\
+ boost::parameter::keyword<a::b> const b;\" \\ + \"BOOST_PP_ENUM_PARAMS(a,b)=b ## 1, b ## 2, ...\""
+        <doxygen:param>HIDE_UNDOC_MEMBERS=NO
+        <doxygen:param>EXTRACT_PRIVATE=NO
+        <doxygen:param>ENABLE_PREPROCESSING=YES
+        <doxygen:param>MACRO_EXPANSION=YES
+        <doxygen:param>EXPAND_ONLY_PREDEF=YES
+        <doxygen:param>SEARCH_INCLUDES=NO
+        <reftitle>"Accumulators Framework Reference"
+        <dependency>latex.check
+        <dependency>dvips.check
+        <dependency>gs.check
+    ;
+
+# Generate the HTML form of the stats documentation, as this
+# causes Doxygen to generate .png images for the LaTeX formulas
+# embedded in the doc comments.
+doxygen statsdoc.html
+    :
+        [ glob ../../../boost/accumulators/statistics*.hpp ]
+        [ glob ../../../boost/accumulators/statistics/*.hpp ]
+        [ glob ../../../boost/accumulators/statistics/variates/*.hpp ]
+    :
+        <dependency>latex.check
+        <dependency>dvips.check
+        <dependency>gs.check
+    ;
+
+if [ os.name ] = NT
+{
+    CP = copy /y ;
+    MKDIR = mkdir ;
+    FROM = \\..\\..\\..\\html\\statsdoc\\*.png ;
+    TOHTML = .\\html\\images\\accumulators ;
+    TOPDF = \\images\\accumulators ;
+}
+else
+{
+    CP = cp ;
+    MKDIR = mkdir -p ;
+    FROM = /../../html/statsdoc/*.png ;
+    TOHTML = ./html/images/accumulators ;
+    TOPDF = /images/accumulators ;
+}
+
+actions copy-latex-pngs
+{
+    $(MKDIR) $(TOHTML)
+    $(MKDIR) $(<:D)$(TOPDF)
+    $(CP) $(<:D)$(FROM) $(TOHTML)
+    $(CP) $(<:D)$(FROM) $(<:D)$(TOPDF)
+    echo "Stamped" > "$(<)"
+}
+
+# This causes the png files built above to be copied
+# into the html/images/accumulators directory.
+make statsdoclatex.tag
+    : statsdoc.html
+    : @copy-latex-pngs
+    ;
+
+doxygen statsdoc
+    :
+        [ glob ../../../boost/accumulators/statistics*.hpp ]
+        [ glob ../../../boost/accumulators/statistics/*.hpp ]
+        [ glob ../../../boost/accumulators/statistics/variates/*.hpp ]
+    :
+        <doxygen:param>EXTRACT_ALL=YES
+ <doxygen:param>"PREDEFINED=\"BOOST_ACCUMULATORS_DOXYGEN_INVOKED=1\" \\
+                                   \"BOOST_PP_REPEAT_FROM_TO(a,b,c,d)=\" \\
+                                   \"BOOST_PP_REPEAT(a,b,c)=\" \\
+                                   \"BOOST_PARAMETER_KEYWORD(a,b)=\\
+                                         namespace a { struct b {}; } \\
+ boost::parameter::keyword<a::b> const b;\" \\ + \"BOOST_PP_ENUM_PARAMS(a,b)=b ## 1, b ## 2, ...\""
+        <doxygen:param>HIDE_UNDOC_MEMBERS=NO
+        <doxygen:param>EXTRACT_PRIVATE=NO
+        <doxygen:param>ENABLE_PREPROCESSING=YES
+        <doxygen:param>MACRO_EXPANSION=YES
+        <doxygen:param>EXPAND_ONLY_PREDEF=YES
+        <doxygen:param>SEARCH_INCLUDES=NO
+        <doxygen:param>TAGFILES=accumulators.tag
+        <xsl:param>boost.doxygen.formuladir=images/accumulators/
+        <reftitle>"Statistics Library Reference"
+        <dependency>tagfile
+        <dependency>statsdoclatex.tag
+        <dependency>latex.check
+        <dependency>dvips.check
+        <dependency>gs.check
+    ;
+
+doxygen opdoc
+    :
+        [ glob ../../../boost/accumulators/numeric/functional.hpp ]
+        [ glob ../../../boost/accumulators/numeric/functional/*.hpp ]
+    :
+        <doxygen:param>EXTRACT_ALL=YES
+ <doxygen:param>"PREDEFINED=\"BOOST_NUMERIC_FUNCTIONAL_DOXYGEN_INVOKED=1\" \\ + \"BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(a,b,c)=\\
+                                         namespace functional { \\
+ template<class Left,class Right,class EnableIf=void> struct a ## _base \\ + : std::binary_function<Left, Right, typeof(lvalue<Left>() b lvalue<Right>())> { \\
+                                         /** \\return left b right */ \\
+ result_type operator()(Left &left, Right &right) const; }; \\ + template<class Left,class Right, \\ + class LeftTag=typename tag<Left>::type, \\ + class RightTag=typename tag<Right>::type> \\ + struct a : a ## _base<Left,Right,void> {}; } \\
+                                         namespace op { \\
+ struct a : boost::detail::function2< \\ + functional::a<_1,_2,functional::tag<_1>,functional::tag<_2> > > {}; } \\
+                                         namespace { \\
+ /** \\return functional::a<Left, Right>()(left, right) */ \\ + op::a const & a = boost::detail::pod_singleton<op::min_assign>::instance; } \" \\ + \"BOOST_NUMERIC_FUNCTIONAL_DEFINE_UNARY_OP(a,b)=\\
+                                         namespace functional { \\
+ template<class Arg,class EnableIf=void> struct a ## _base \\ + : std::unary_function<Arg, typeof(b lvalue<Arg>())> { \\
+                                         /** \\return b arg */ \\
+ result_type operator()(Arg & arg) const; }; \\ + template<class Arg,class Tag=typename tag<Arg>::type> \\ + struct a : a ## _base<Arg,void> {}; } \\
+                                         namespace op { \\
+ struct a : boost::detail::function1< \\ + functional::a<_,functional::tag<_> > > {}; } \\
+                                         namespace { \\
+ /** \\return functional::a<Arg>()(arg) */ \\ + op::a const & a = boost::detail::pod_singleton<op::min_assign>::instance; }\""
+        <doxygen:param>HIDE_UNDOC_MEMBERS=NO
+        <doxygen:param>EXTRACT_PRIVATE=NO
+        <doxygen:param>ENABLE_PREPROCESSING=YES
+        <doxygen:param>MACRO_EXPANSION=YES
+        <doxygen:param>EXPAND_ONLY_PREDEF=YES
+        <doxygen:param>SEARCH_INCLUDES=NO
+        <reftitle>"Numeric Operators Library Reference"
+        <dependency>latex.check
+        <dependency>dvips.check
+        <dependency>gs.check
+    ;
+
+xml accumulators
+    :
+        accumulators.qbk
+    :
+        <xsl:param>boost.max.id.length=1024
+        <xsl:param>toc.max.depth=4
+        <xsl:param>toc.section.depth=4
+        <xsl:param>chunk.section.depth=2
+    ;
+
+path-constant images_location : html ;
+
+boostbook standalone
+    :
+        accumulators
+    :
+        <xsl:param>boost.max.id.length=1024
+        <xsl:param>toc.max.depth=4
+        <xsl:param>toc.section.depth=4
+        <xsl:param>chunk.section.depth=2
+        <dependency>accdoc
+        <dependency>statsdoc
+        <dependency>opdoc
+        <format>pdf:<xsl:param>img.src.path=$(images_location)/
+ <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
+    ;
+
=======================================
--- /dev/null
+++ /trunk/libs/accumulators/doc/accumulators.qbk       Mon Dec 28 23:05:14 2009
@@ -0,0 +1,4557 @@
+
+[library Boost.Accumulators
+    [quickbook 1.3]
+    [authors [Niebler, Eric]]
+    [copyright 2005 2006 Eric Niebler]
+    [category math]
+    [id accumulators]
+    [dirname accumulators]
+    [purpose
+ Incremental accumulation framework and statistical accumulator library.
+    ]
+    [license
+        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])
+    ]
+]
+
+[/  Images   ]
+
+[def _note_                  [$images/note.png]]
+[def _alert_                 [$images/caution.png]]
+[def _detail_                [$images/note.png]]
+[def _tip_                   [$images/tip.png]]
+
+[/  Links   ]
+
+[def _sample_type_           '''<replaceable>sample-type</replaceable>''']
+[def _weight_type_           '''<replaceable>weight-type</replaceable>''']
+[def _variate_type_          '''<replaceable>variate-type</replaceable>''']
+[def _variate_tag_           '''<replaceable>variate-tag</replaceable>''']
+[def _left_or_right_ '''<replaceable>left-or-right</replaceable>'''] +[def _implementation_defined_ '''<replaceable>implementation-defined</replaceable>''']
+[def _boost_                 [@http://www.boost.org Boost]]
+[def _mpl_                   [@../../libs/mpl/index.html MPL]]
+[def _mpl_lambda_expression_ [@../../libs/mpl/doc/refmanual/lambda-expression.html MPL Lambda Expression]] +[def _parameter_ [@../../libs/parameter/index.html Boost.Parameter]] +[def _accumulator_set_ [classref boost::accumulators::accumulator_set `accumulator_set<>`]] +[def _accumulator_base_ [classref boost::accumulators::accumulator_base `accumulator_base`]] +[def _depends_on_ [classref boost::accumulators::depends_on `depends_on<>`]] +[def _feature_of_ [classref boost::accumulators::feature_of `feature_of<>`]] +[def _as_feature_ [classref boost::accumulators::as_feature `as_feature<>`]] +[def _features_ [classref boost::accumulators::features `features<>`]] +[def _external_ [classref boost::accumulators::external `external<>`]] +[def _droppable_ [classref boost::accumulators::droppable `droppable<>`]] +[def _droppable_accumulator_ [classref boost::accumulators::droppable_accumulator `droppable_accumulator<>`]] +[def _extractor_ [classref boost::accumulators::tag::extractor `extractor<>`]] +[def _tail_ [classref boost::accumulators::tag::tail `tail`]] +[def _tail_variate_ [classref boost::accumulators::tag::tail_variate `tail_variate<>`]] +[def _extract_result_ [funcref boost::accumulators::extract_result `extract_result()`]] +[def _ZKB_ [@http://www.zkb.com Z'''&uuml;'''rcher Kantonalbank]]
+
+[section:preface Preface 前言]
+
+[:["It is better to be approximately right than exactly wrong."
+\n"近似的正确要好于精确的错误"]
+\n['-- Old adage 古谚语]]
+
+[h2 Description 说明]
+
+Boost.Accumulators is both a library for incremental statistical computation as +well as an extensible framework for incremental calculation in general. The library
+deals primarily with the concept of an ['accumulator], which is a primitive
+computational entity that accepts data one sample at a time and maintains some +internal state. These accumulators may offload some of their computations on other +accumulators, on which they depend. Accumulators are grouped within an ['accumulator +set]. Boost.Accumulators resolves the inter-dependencies between accumulators in a
+set and ensures that accumulators are processed in the proper order.
+\n大致上,Boost.Accumulators 既是一个用于增量统计计算的库,也是一个用于增量 计算的可扩展框架。 +起初该库主要涉及 ['accumulator累加器] 概念,它是一个简单的计算实体,每次接 受一个数据样本并维护一些内部状态。 +这些累加器可能将其中一些计算卸给其它所依赖的累加器。多个累加器被组成一个 ['accumulator set累加器集]。 +Boost.Accumulators 解决了一个累加器集中各累加器间的互相依赖,并确保各个累加 器以正确的顺序进行处理。
+
+[endsect]
+
+[section:user_s_guide User's Guide 用户指南]
+
+This section describes how to use the Boost.Accumulators framework to create new +accumulators and how to use the existing statistical accumulators to perform incremental +statistical computation. For detailed information regarding specific components in +Boost.Accumulators, check the [link accumulators_framework_reference Reference] section. +\n本节描述了如何使用 Boost.Accumulators 框架来创建一个新的累加器,以及如何 使用已有的统计累加器来执行增量统计计算。 +关于 Boost.Accumulators 中的特定组件的详细信息,请查看 [link accumulators_framework_reference 参考] 一节。
+
+[h2 Hello, World!]
+
+Below is a complete example of how to use the Accumulators Framework and the +Statistical Accumulators to perform an incremental statistical calculation. It
+calculates the mean and 2nd moment of a sequence of doubles.
+\n以下是一个关于如何使用累加器框架和统计累加器来执行增量统计计算的完整例 子。
+它计算一组 double 的平均值和二次矩。
+
+    #include <iostream>
+    #include <boost/accumulators/accumulators.hpp>
+    #include <boost/accumulators/statistics/stats.hpp>
+    #include <boost/accumulators/statistics/mean.hpp>
+    #include <boost/accumulators/statistics/moment.hpp>
+    using namespace boost::accumulators;
+
+    int main()
+    {
+        // Define an accumulator set for calculating the mean and the
+        // 2nd moment ...
+               // 为计算平均值和二次矩定义一个累加器集 ...
+        accumulator_set<double, stats<tag::mean, tag::moment<2> > > acc;
+
+        // push in some data ...  压入一些数据 ...
+        acc(1.2);
+        acc(2.3);
+        acc(3.4);
+        acc(4.5);
+
+        // Display the results ...  显示结果 ...
+        std::cout << "Mean:   " << mean(acc) << std::endl;
+        std::cout << "Moment: " << moment<2>(acc) << std::endl;
+
+        return 0;
+    }
+
+This program displays the following:
+\n该程序输出如下:
+
+[pre
+Mean:   2.85
+Moment: 9.635
+]
+
+[section The Accumulators Framework 累加器框架]
+
+The Accumulators Framework is framework for performing incremental calculations. Usage
+of the framework follows the following pattern:
+\n累加器框架是用于执行增量计算的框架。该框架的使用遵循以下模式:
+
+* Users build a computational object, called an ['_accumulator_set_], by selecting + the computations in which they are interested, or authoring their own computational
+  primitives which fit within the framework.
+ \n用户通过选择他们感兴趣的计算方法来构建一个计算对象,称为 ['_accumulator_set_],
+  或者创造他们自己的符合该框架的计算方法。
+* Users push data into the _accumulator_set_ object one sample at a time.
+  \n用户将数据压入 _accumulator_set_ 对象,每次一个数据样本。
+* The _accumulator_set_ computes the requested quantities in the most efficient method + possible, resolving dependencies between requested calculations, possibly cacheing
+  intermediate results.
+ \n _accumulator_set_ 以尽可能高效的方法来计算被请求的数量,解决各种计算方 法间的依赖性,
+  可能会对中间结果进行缓存。
+
+The Accumulators Framework defines the utilities needed for defining primitive +computational elements, called ['accumulators]. It also provides the _accumulator_set_
+type, described above.
+\n累加器框架定义了一些工具,它们是定义基本计算元素所需要的,被称为 ['accumulators累加器]。
+它还提供了前述的 _accumulator_set_ 类型。
+
+[h2 Terminology 术语]
+
+The following terms are used in the rest of the documentation.
+\n以下术语将在本文档中使用。
+
+[variablelist
+ [[Sample 样本] [[#sample_type] A datum that is pushed into an _accumulator_set_. + The type of the sample is the ['sample type]. + \n被压入 _accumulator_set_ 的数据。样本的类型为 ['sample type样本 类型]。]] + [[Weight 权重] [[#weight_type] An optional scalar value passed along with the + sample specifying the weight of the sample. Conceptually, each + sample is multiplied with its weight. The type of the weight is
+                                 the ['weight type].
+                                                                
\n与样本一起传递的一个可选的比例值,用于指定该样本的权重。
+ 概念上,每个样本要与其权重相乘。权重的类型为 ['weight type权重类型 ]。]] + [[Feature 特征] [An abstract primitive computational entity. When defining an + _accumulator_set_, users specify the features in which they are + interested, and the _accumulator_set_ figures out which + ['accumulators] would best provide those features. Features may + depend on other features. If they do, the accumulator set figures + out which accumulators to add to satisfy the dependencies.
+                                                                \n一个抽象的基本计算实体。在定义一个 
_accumulator_set_ 时,
+ 用户指定他们感兴趣的特征,然后 _accumulator_set_ 确定哪些['累加器 ]最适合提供这些特征。 + 一个特征可以依赖于其它特征。如果它们有依赖关系,累加器集负责决定加 入哪些累加器以满足依赖关系。]] + [[Accumulator 累加器] [A concrete primitive computational entity. An accumulator is a + concrete implementation of a feature. It satisfies exactly one + abstract feature. Several different accumulators may provide the + same feature, but may represent different implementation strategies. + \n一个具体的计算实体。累加器是特征的具体实现。它精确满足某个抽象特 征。
+                                                                
多个不同的累加器可以提供相同的特征,但可能代表不同的实现策略。]]
+ [[Accumulator Set 累加器集] [A collection of accumulators. An accumulator set is specified with + a sample type and a list of features. The accumulator set uses this + information to generate an ordered set of accumulators depending on + the feature dependency graph. An accumulator set accepts samples one + datum at a time, propogating them to each accumulator in order. At any + point, results can be extracted from the accumulator set.
+                                                                
\n一组累加器。累加器集被指定了一个样本类型和一组特征。
+ 累加器集使用这些信息并根据特征依赖关系图来生成累加器的一个有序集 合。
+                                                                
累加器集每次接受一个数据样本,并将它们按顺序传播给每个累加器。
+                                                                
任何时间点都可以从累加器集获取相应结果。]]
+ [[Extractor 提取器] [A function or function object that can be used to extract a result
+                                 from an _accumulator_set_.
+                                                                \n一个函数或函数对象,可用于从一个 _accumulator_set_ 
取出结果。]]
+]
+
+[h2 Overview 概览]
+
+Here is a list of the important types and functions in the Accumulator Framework and
+a brief description of each.
+\n以下是在累加器框架中最重要的类型和函数,以及它们各自的说明。
+
+[table Accumulators Toolbox 累加器工具盒
+    [[Tool 工具]         [Description 说明]]
+ [[_accumulator_set_] [This is the most important type in the Accumulators Framework. + It is a collection of accumulators. A datum pushed into an + _accumulator_set_ is forwarded to each accumulator, in an order + determined by the dependency relationships between the + accumulators. Computational results can be extracted from an
+                          accumulator at any time.
+                                                 
\n这是累加器框架中最重要的类型。它是一组累加器。一个数据被压入一个
+ _accumulator_set_ 后将被按照由各累加器间的依赖关系所决定的顺序前转 至每个累加器。
+                                                 计算的结果可以在任何时候从累加器上取出。]]
+ [[_depends_on_ ] [Used to specify which other features a feature depends on.
+                             \n用于指定一个特征所依赖的其它特征。]]
+ [[_feature_of_ ] [Trait used to tell the Accumulators Framework that, for the purpose + of feature-based dependency resolution, one feature should be
+                          treated the same as another.
+ \n一个 Trait,用于告诉累加器框架一个特征与其它某个特征具有相同的处 理结果,
+                                                 其目的是为了基于特征的依赖性决议。]]
+ [[_as_feature_ ] [Used to create an alias for a feature. For example, if there are + two features, fast_X and accurate_X, they can be mapped to + X(fast) and X(accurate) with _as_feature_. This is just syntactic
+                          sugar.
+ \n用于创建一个特征的别名。例如,如果有两个特征 fast_X 和 accurate_X, + 它们可以通过 _as_feature_ 被映射到 X(fast) 和 X(accurate)。这只是一 个语法糖。]] + [[_features_ ] [An _mpl_ sequence. We can use _features_ as the second template
+                          parameter when declaring an _accumulator_set_.
+                                                 \n一个 _mpl_ 序列。我们可以在声明 _accumulator_set_ 
时将 _features_
+                                                 用作第二个模板参数。]]
+ [[_external_ ] [Used when declaring an _accumulator_set_. If the weight type is + specified with _external_, then the weight accumulators are + assumed to reside in a separate accumulator set which will be passed
+                          in with a named parameter.
+                                                 \n在声明 _accumulator_set_ 
时使用。如果权重类型是通过 _external_
+ 指定的,则权重累加器被假定位于一个独立的累加器集,它将以一个命名参 数的方式传递。]] + [[_extractor_ ] [A class template useful for creating an extractor function object. + It is parameterized on a feature, and it has member functions for + extracting from an _accumulator_set_ the result corresponding to
+                          that feature.
+                                                 
\n一个类模板,用于创建一个提取器函数对象。它按特征进行参数化,
+                                                 它有一些成员函数,从 accumulator_set_ 
获取与特征相对应的结果。]]
+]
+
+[section Using [^accumulator_set<>] 使用[^accumulator_set<>]]
+
+Our tour of the _accumulator_set_ class template begins with the forward declaration:
+\n我们的 _accumulator_set_ 类模板之旅从这个前向声明开始:
+
+    template< typename Sample, typename Features, typename Weight = void >
+    struct accumulator_set;
+
+The template parameters have the following meaning:
+\n模板参数具有以下意义:
+
+[variablelist
+    [[`Sample`]     [The type of the data that will be accumulated.
+                        \n将被累计的数据的类型。]]
+    [[`Features`]   [An _mpl_ sequence of features to be calculated.
+                        \n要计算的多个特征的 _mpl_ 序列。]]
+    [[`Weight`]     [The type of the (optional) weight paramter.
+                        \n(可选的)权重参数的类型。]]
+]
+
+For example, the following line declares an _accumulator_set_ that will accept
+a sequence of doubles one at a time and calculate the min and mean:
+\n例如,以下一行代码声明了一个 _accumulator_set_,它将一次一个地接受一组 double,
+并计算最小值和平均值:
+
+    accumulator_set< double, features< tag::min, tag::mean > > acc;
+
+Notice that we use the _features_ template to specify a list of features to be calculated.
+_features_ is an MPL sequence of features.
+\n注意,我们使用了 _features_ 模板来指定一个要计算的特征列表。_features_
+是多个特征组成的一个 MPL 序列。
+
+[note _features_ is a synonym of `mpl::vector<>`. In fact, we could use `mpl::vector<>`
+ or any MPL sequence if we prefer, and the meaning would be the same.
+ \n _features_ 是 `mpl::vector<>` 一个同义字。事实上,如果愿意,我们可以使
+ `mpl::vector<>` 或任何 MPL 序列,意思是一样的。]
+
+Once we have defined an _accumulator_set_, we can then push data into it,
+and it will calculate the quantities you requested, as shown below.
+\n一旦我们定义了一个 _accumulator_set_,我们就可以将数据压进去给它,
+它就会对你所需要的数量进行计算,如下所示:
+
+    // push some data into the accumulator_set ...
+       // 压入一些数据到 accumulator_set ...
+    acc(1.2);
+    acc(2.3);
+    acc(3.4);
+
+Since _accumulator_set_ defines its accumulate function to be the function call operator, +we might be tempted to use an _accumulator_set_ as a UnaryFunction to a standard +algorithm such as `std::for_each`. That's fine as long as we keep in mind that the standard +algorithms take UnaryFunction objects by value, which involves making a copy of the
+_accumulator_set_ object. Consider the following:
+\n因为 _accumulator_set_ 将它的累加器函数定义为函数调用操作符,所以我们可以 将一个
+_accumulator_set_ 作为一个 UnaryFunction 用于标准算法,如 `std::for_each`。
+只要我们牢记标准算法是以传值方式接受 UnaryFunction 对象的就可以了,即会复制 一份
+_accumulator_set_ 对象。考虑以下代码:
+
+    // The data for which we wish to calculate statistical properties:
+    // 我们想要计算统计特征的数据:
+    std::vector< double > data( /* stuff */ );
+
+    // The accumulator set which will calculate the properties for us:
+    // 为我们计算统计特征的累加器集:
+    accumulator_set< double, features< tag::min, tag::mean > > acc;
+
+    // Use std::for_each to accumulate the statistical properties:
+    // 使用 std::for_each 来累计相关统计特征:
+    acc = std::for_each( data.begin(), data.end(), acc );
+
+Notice how we must assign the return value of `std::for_each` back to the _accumulator_set_.
+This works, but some accumulators are not cheap to copy. For
+example, the _tail_ and _tail_variate_ accumulators must store a `std::vector<>`, so copying +these accumulators involves a dynamic allocation. We might be better off in this +case passing the accumulator by reference, with the help of `boost::bind()` and
+`boost::ref()`. See below:
+\n请留意,我们必须将 `std::for_each` 的返回值赋回给 _accumulator_set_。
+这样是可以的,但是有些累加器在复制时代价并不低。例如,累加器 _tail_ 和 _tail_variate_ +累加器必须保存一个 `std::vector<>`,所以复制这些累加器将包含一次动态内存分 配。在这种情况下, +以引用方式传递累加器也许更好,这时可以使用 `boost::bind()` 和 `boost::ref()`。如下:
+
+    // The data for which we wish to calculate statistical properties:
+    // 我们想要计算统计特征的数据:
+    std::vector< double > data( /* stuff */ );
+
+    // The accumulator set which will calculate the properties for us:
+    // 为我们计算统计特征的累加器集:
+    accumulator_set< double, features< tag::tail<left> > > acc(
+        tag::tail<left>::cache_size = 4 );
+
+    // Use std::for_each to accumulate the statistical properties:
+    // 使用 std::for_each 来累计相关统计特征:
+    std::for_each( data.begin(), data.end(), bind<void>( ref(acc), _1 ) );
+
+Notice now that we don't care about the return value of `std::for_each()` anymore because
+`std::for_each()` is modifying `acc` directly.
+\n现在请留意,我们不再关心 `std::for_each()` 的返回值了,因为 `std::for_each()`
+可以直接修改 `acc` 了。
+
+[note To use `boost::bind()` and `boost::ref()`, you must `#include` [^<boost/bind.hpp>]
+and [^<boost/ref.hpp>]
+\n要使用 `boost::bind()` 和 `boost::ref()`,你必须 `#include` [^<boost/bind.hpp>] 和
+[^<boost/ref.hpp>]]
+
+[endsect]
+
+[section Extracting Results 取出结果]
+
+Once we have declared an _accumulator_set_ and pushed data into it, we need to be able +to extract results from it. For each feature we can add to an _accumulator_set_, there +is a corresponding extractor for fetching its result. Usually, the extractor has the +same name as the feature, but in a different namespace. For example, if we accumulate +the `tag::min` and `tag::max` features, we can extract the results with the `min` and `max`
+extractors, as follows:
+\n一旦我们声明了一个 _accumulator_set_ 并且向它压入数据,我们就必须可以从它 获取结果。 +对于每一个我们可以加入到 _accumulator_set_ 中的特征,都有一个对应的提取器来 获取结果。 +通常,该提取器具有与特征相同的名字,但是是在另一个名字空间中。例如,如果我 们要累计 +`tag::min` 和 `tag::max` 特征,则可以用 `min` 和 `max` 提取器获取结果,如 下:
+
+    // Calculate the minimum and maximum for a sequence of integers.
+    // 计算一组整数的最小值和最大值
+    accumulator_set< int, features< tag::min, tag::max > > acc;
+    acc( 2 );
+    acc( -1 );
+    acc( 1 );
+
+    // This displays "(-1, 2)"  将显示 "(-1, 2)"
+    std::cout << '(' << min( acc ) << ", " << max( acc ) << ")\n";
+
+The extractors are all declared in the `boost::accumulators::extract` namespace, but they +are brought into the `boost::accumulators` namespace with a `using` declaration. +\n提取器全都在名字空间 `boost::accumulators::extract` 中声明,不过可以通过 一个 `using`
+声明将它们注入 `boost::accumulators` 名字空间。
+
+[tip On the Windows platform, `min` and `max` are preprocessor macros defined in [^WinDef.h]. + To use the `min` and `max` extractors, you should either compile with `NOMINMAX` defined, or + you should invoke the extractors like: `(min)( acc )` and `(max)( acc )`. The parentheses
+ keep the macro from being invoked.
+ \n在 Windows 平台上,`min` 和 `max` 是在 [^WinDef.h] 中定义的预处理器。
+ 要使用 `min` 和 `max` 提取器,你应该要么在编译时定义 `NOMINMAX`,要么象这 样来调用提取器:
+ `(min)( acc )` 和 `(max)( acc )`。其中的括号将阻止宏调用。]
+
+Another way to extract a result from an _accumulator_set_ is with the
+`extract_result()` function. This can be more convenient if there isn't an extractor +object handy for a certain feature. The line above which displays results could
+equally be written as:
+\n另一种从 _accumulator_set_ 中取出结果的方法是,使用 `extract_result()` 函 数。 +如果某个特征不存在方便的提取器对象,这样会更方便一些。上述例子中显示结果的 那行代码也可以写为:
+
+    // This displays "(-1, 2)"  将显示 "(-1, 2)"
+    std::cout << '('  << extract_result< tag::min >( acc )
+              << ", " << extract_result< tag::max >( acc ) << ")\n";
+
+Finally, we can define our own extractor using the _extractor_ class template. For +instance, another way to avoid the `min` / `max` macro business would be to define
+extractors with names that don't conflict with the macros, like this:
+\n最后,我们用 _extractor_ 类模板定义我们自己的提取器。例如,避免 `min` / `max`
+宏的麻烦的另一种方法是,定义另一个名字不冲突的提取器,如下:
+
+    extractor< tag::min > min_;
+    extractor< tag::min > max_;
+
+    // This displays "(-1, 2)"  将显示 "(-1, 2)"
+    std::cout << '(' << min_( acc ) << ", " << max_( acc ) << ")\n";
+
+[endsect]
+
+[section Passing Optional Parameters 传递可选参数]
+
+Some accumulators need initialization parameters. In addition, perhaps some auxiliary +information needs to be passed into the _accumulator_set_ along with each sample. +Boost.Accumulators handles these cases with named parameters from the _parameter_
+library.
+\n有些累加器需要初始化参数。另外,可能还有些辅助信息要和每个样本一起传给 _accumulator_set_。
+Boost.Accumulators 通过来自于 _parameter_ 库的命名参数来处理这些情况。
+
+For example, consider the _tail_ and _tail_variate_ features. _tail_ keeps
+an ordered list of the largest [^['N]] samples, where [^['N]] can be specified at +construction time. Also, the _tail_variate_ feature, which depends on _tail_, keeps +track of some data that is covariate with the [^['N]] samples tracked by _tail_. The
+code below shows how this all works, and is described in more detail below.
+\n以 _tail_ 和 _tail_variate_ 特征为例。_tail_ 保存了最大 [^['N]] 个样本的 一个有序列表, +其中 [^['N]] 可以在构造时指定。同样,_tail_variate_ 特征依赖于 _tail_,它跟 踪某些跟随 +_tail_ 所保存的 [^['N]] 个样本而变化的数据。以下代码示范了它们如何工作,后 面有更多细节的说明。
+
+    // Define a feature for tracking covariate data
+    // 定义一个特征以跟踪变化的数据
+ typedef tag::tail_variate< int, tag::covariate1, left > my_tail_variate_tag;
+
+    // This will calculate the left tail and my_tail_variate_tag for N == 2
+    // using the tag::tail<left>::cache_size named parameter
+ // 以下使用 tag::tail<left>::cache_size 命名参数针对 N == 2 计算左 tail 和 my_tail_variate_tag
+    accumulator_set< double, features< my_tail_variate_tag > > acc(
+        tag::tail<left>::cache_size = 2 );
+
+    // push in some samples and some covariates by using
+    // the covariate1 named parameter
+    // 使用 covariate1 命名参数压入一些数据和一些关联值
+    acc( 1.2, covariate1 =  12 );
+    acc( 2.3, covariate1 = -23 );
+    acc( 3.4, covariate1 =  34 );
+    acc( 4.5, covariate1 = -45 );
+
+    // Define an extractor for the my_tail_variate_tag feature
+    // 为 my_tail_variate_tag 特征定义一个提取器
+    extractor< my_tail_variate_tag > my_tail_variate;
+
+    // Write the tail statistic to std::cout. This will print "4.5, 3.4, "
+    // 打印 tail 统计值到 std::cout。将打印 "4.5, 3.4, "
+    std::ostream_iterator< double > dout( std::cout, ", " );
+    std::copy( tail( acc ).begin(), tail( acc ).end(), dout );
+
+ // Write the tail_variate statistic to std::cout. This will print "-45, 34, "
+    // 打印 tail_variate 统计值到 std::cout。将打印 "-45, 34, "
+    std::ostream_iterator< int > iout( std::cout, ", " );
+ std::copy( my_tail_variate( acc ).begin(), my_tail_variate( acc ).end(), iout );
+
+There are several things to note about the code above. First, notice that we didn't have +to request that the _tail_ feature be calculated. That is implicit because the _tail_variate_
+feature depends on the _tail_ feature. Next, notice how the `acc` object
+is initialized: `acc( tag::tail<left>::cache_size = 2 )`. Here, `cache_size` is a named parameter. +It is used to tell the _tail_ and _tail_variate_ accumulators how many samples and +covariates to store. Conceptually, every construction parameter is made available to
+every accumulator in an accumulator set.
+\n以上代码中有几个要注意的事情。首先,注意我们不必要求 _tail_ 特征被计算。 这是隐含的, +因为 _tail_variate_ 特征依赖于 _tail_ 特征。其次,留意如何初始化 `acc` 对 象: +`acc( tag::tail<left>::cache_size = 2 )`。这里的 `cache_size` 是一个命名参 数。
+它用于通知 _tail_ 和 _tail_variate_ 累加器要保存多少个样本和关联值。
+概念上,每个构造参数都可以用于累加器集中的每个累加器。
+
+We also use a named parameter to pass covariate data into the accumulator set along with +the samples. As with the constructor parameters, all parameters to the accumulate function +are made available to all the accumulators in the set. In this case, only the accumulator +for the `my_tail_variate` feature would be interested in the value of the `covariate1` named
+parameter.
+\n我们还使用了一个命名参数来将关联数据和样本一起传递给累加器集。和构造函数 参数一样, +给累加器函数的所有参数都可以用于累加器集中的所有累加器。在这种情况下,只有 `my_tail_variate`
+特征的累加器会关心 `covariate1` 命名参数的值。
+
+We can make one final observation about the example above. Since _tail_ and _tail_variate_ +are multi-valued features, the result we extract for them is represented as an iterator +range. That is why we can say `tail( acc ).begin()` and `tail( acc ).end()`. +\n对于上述例子,我们可以得到最后一个结果。由于 _tail_ 和 _tail_variate_ 都 是多值特征, +所以我们从它们所获取的结果要表示为一个整数区间。这就是为什么我们使用 `tail( acc ).begin()`
+和 `tail( acc ).end()` 的原因。
+
+Even the extractors can accept named parameters. In a bit, we'll see a situation where that
+is useful.
+\n甚至提取器也可以接受命名参数。稍后我们将看到这样的情况。
+
+[endsect]
+
+[section Weighted Samples 加权样本]
+
+Some accumulators, statistical accumulators in particular, deal with data that are +['weighted]. Each sample pushed into the accumulator has an associated weight, by which +the sample is conceptually multiplied. The Statistical Accumulators Library provides an +assortment of these weighted statistical accumulators. And many unweighted statistical +accumulators have weighted variants. For instance, the weighted variant of the `sum` +accumulator is called `weighted_sum`, and is calculated by accumulating all the
+samples multiplied by their weights.
+\n有些累加器,尤其是统计累加器,要处理['加权]的数据。压入累加器的每个样本都 具有一个相应的权重, +样本应与权重相乘。统计累加器库提供了一类这样的加权统计累加器。许多非加权统 计累加器都具有加权的变体。 +例如,`sum` 累加器的加权变体名为 `weighted_sum`,它通过累加所有样本与权重的 乘积进行计算。
+
+To declare an _accumulator_set_ that accepts weighted samples, you must specify the
+type of the weight parameter as the 3rd template parameter, as follows:
+\n要声明一个接受加权样本的 _accumulator_set_,你必须用第三个模板参数指定权 重参数的类型,如下:
+
+    // 3rd template parameter 'int' means this is a weighted
+    // accumulator set where the weights have type 'int'
+    // 第三个模板参数 'int' 表示这是一个加权累加器集,权重的类型为 'int'
+    accumulator_set< int, features< tag::sum >, int > acc;
+
+When you specify a weight, all the accumulators in the set are replaced with +their weighted equivalents. For example, the above _accumulator_set_ declaration
+is equivalent to the following:
+\n当你指定了一个权重,累加器集中的所有累加器都会被替换为各自的加权变体。
+例如,以上的 _accumulator_set_ 声明相当于:
+
+    // Since we specified a weight, tag::sum becomes tag::weighted_sum
+    // 由于我们指定了权重,tag::sum 变为了 tag::weighted_sum
+    accumulator_set< int, features< tag::weighted_sum >, int > acc;
+
+When passing samples to the accumulator set, you must also specify the
+weight of each sample. You can do that with the `weight` named parameter,
+as follows:
+\n在传递样本给累加器集时,你必须指定每个样本的权重。你可以通过 `weight` 命 名参数来传递,如下:
+
+    acc(1, weight = 2); //   1 * 2
+    acc(2, weight = 4); //   2 * 4
+    acc(3, weight = 6); // + 3 * 6
+                        // -------
+                        // =    28
+
+You can then extract the result with the `sum()` extractor, as follows:
+\n然后你就可以用 `sum()` 提取器来取出结果,如下:
+
+    // This prints "28"  打印 "28"
+    std::cout << sum(acc) << std::endl;
+
+[note When working with weighted statistical accumulators from the Statistical +Accumulators Library, be sure to include the appropriate header. For instance, +`weighted_sum` is defined in `<boost/accumulators/statistics/weighted_sum.hpp>`.
+\n使用来自统计累加器库的加权统计累加器时,请确认已包含合适的头文件。例如,
+`weighted_sum` 的定义位于 `<boost/accumulators/statistics/weighted_sum.hpp>` 中。]
+
+[endsect]
+
+[section Numeric Operators Sub-Library 数学操作符子库]
+
+This section describes the function objects in the `boost::numeric` namespace, which +is a sub-library that provides function objects and meta-functions corresponding
+to the infix operators in C++.
+\n这一节描述位于 `boost::numeric` 名字空间的函数对象,它是一个子库,
+提供了与C++中缀操作符相对应的函数对象和元函数。
+
+In the `boost::numeric::operators` namespace are additional operator overloads for +some useful operations not provided by the standard library, such as multiplication
+of a `std::complex<>` with a scalar.
+\n在 `boost::numeric::operators` 名字空间中,是一些在标准库中没有提供的但很 有用的操作符的重载,
+如 `std::complex<>` 与标量的乘法。
+
+In the `boost::numeric::functional` namespace are function object equivalents of +the infix operators. These function object types are heterogeneous, and so are more +general than the standard ones found in the [^<functional>] header. They use the +Boost.Typeof library to deduce the return types of the infix expressions they +evaluate. In addition, they look within the `boost::numeric::operators` namespace
+to consider any additional overloads that might be defined there.
+\n在 `boost::numeric::functional` 名字空间中,是与中缀操作符相等价的函数对 象。 +这些函数对象的类型是异类的,所以比在 [^<functional>] 头文件中的标准函数对象 更为通用。
+它们使用 Boost.Typeof 库来推断所要求值的中缀表达式的返回类型。另外,它们在
+`boost::numeric::operators` 名字空间内部查找可能定义的重载。
+
+In the `boost::numeric` namespace are global polymorphic function objects
+corresponding to the function object types defined in the `boost::numeric::functional`
+namespace. For example, `boost::numeric::plus(a, b)` is equivalent to
+`boost::numeric::functional::plus<A, B>()(a, b)`, and both are equivalent to
+`using namespace boost::numeric::operators; a + b;`.
+\n在 `boost::numeric` 名字空间中,是与定义在 `boost::numeric::functional`
+名字空间中的函数对象类型相对应的全局多态函数对象。例 如,`boost::numeric::plus(a, b)`
+等价于 `boost::numeric::functional::plus<A, B>()(a, b)`,它们都等价于
+`using namespace boost::numeric::operators; a + b;`。
+
+The Numeric Operators Sub-Library also gives several ways to sub-class and
+a way to sub-class and specialize operations. One way uses tag dispatching on
+the types of the operands. The other way is based on the compile-time
+properties of the operands.
+\n数字操作符子库还给出几种子类化的方法,和一种子类化与特化操作的方法。
+一种方法是用 tag 来基于操作数的类型进行分派。另一种方法则基于操作数的编译期 属性。
+
+[endsect]
+
+[section Extending the Accumulators Framework 对累加器框架进行扩展]
+
+This section describes how to extend the Accumulators Framework by defining new accumulators, +features and extractors. Also covered are how to control the dependency resolution of
+features within an accumulator set.
+\n这一节描述如何通过定义新的累加器、特征和提取器来扩展这个累加器框架。
+还有如何控制在累加器集中各个特征的依赖关系决议。
+
+[section Defining a New Accumulator 定义新的累加器]
+
+All new accumulators must satisfy the [link
+accumulators.user_s_guide.the_accumulators_framework.concepts.accumulator_concept Accumulator +Concept]. Below is a sample class that satisfies the accumulator concept, which simply sums
+the values of all samples passed into it.
+\n所有新的累加器都必须满足 [link accumulators.user_s_guide.the_accumulators_framework.concepts.accumulator_concept 累加器概念]。
+以下是一个满足累加器概念的简单类,它对所有传入的样本进行求和。
+
+    #include <boost/accumulators/framework/accumulator_base.hpp>
+    #include <boost/accumulators/framework/parameters/sample.hpp>
+
+ namespace boost { // Putting your accumulators in the + namespace accumulators { // impl namespace has some advantages. See below. + namespace impl { // 将你的累加器置于 impl 名 字空间有一些好处。具体见后。
+
+    template<typename Sample>
+ struct sum_accumulator // All accumulators should inherit from accumulator_base. + : accumulator_base // 所有累加器都应继承自 accumulator_base。
+    {
+ typedef Sample result_type; // The type returned by result() below. 后述 result() 的返回类型。
+
+ template<typename Args> // The constructor takes an argument pack. 构造函数接受一个参数包。
+        sum_accumulator(Args const & args)
+ : sum(args[sample | Sample()]) // Maybe there is an initial value in the argument pack. + { // ('sample' is defined in sample.hpp, included above.) + } // 参数包中可能有初始值 ('sample'定义于sample.hpp,前面已包含)。
+
+ template<typename Args> // The accumulate function is the function + void operator ()(Args const & args) // call operator, and it also accepts an argument pack. + { // 累加函数是函数调用操作 符,它也接受一个参数包。
+            this->sum += args[sample];
+        }
+
+ result_type result(dont_care) const // The result function will also be passed an argument pack, + { // but we don't use it here, so we use "dont_care" as the argument type. + return this->sum; // result 函数也被传入一个 参数包,但我们不使用它,所以用"dont_care"作为参数类型。
+        }
+    private:
+        Sample sum;
+    };
+
+    }}}
+
+Much of the above should be pretty self-explanitory, except for the use of argument packs +which may be confusing if you have never used the _parameter_ library before. An argument +pack is a cluster of values, each of which can be accessed with a key. So `args[sample]` +extracts from the pack the value associated with the `sample` key. And the cryptic +`args[sample | Sample()]` evaluates to the value associated with the `sample` key if it
+exists, or a default-constructed `Sample` if it doesn't.
+\n上面多数代码都可以很好地自解释,除了对参数包的使用可能会让你糊涂,如果你 以前从来没有用过 +_parameter_ 库的话。一个参数包是一簇值,其中每一个都可以通过键值来访问。所 以可以使用 +`args[sample]` 从包中取出与 `sample` 键相关联的值。而诡异的 `args[sample | Sample()]` +将会在 `sample` 键存在时求出其关联值,或者在该键不存在时给出一个缺省构造的 `Sample`。
+
+The example above demonstrates the most common attributes of an accumulator. There are
+other optional member functions that have special meaning. In particular:
+\n以上例子示范了一个累加器最常用的属性。还有其它一些可选的成员函数具有特殊 的意义。特别是:
+
+[variablelist Optional Accumulator Member Functions 可选的累加器成员函数
+[[[^on_drop(Args)]] [Defines an action to be taken when this accumulator is
+                             dropped. See the section on
+ [link accumulators.user_s_guide.the_accumulators_framework.extending_the_accumulators_framework.defining_a_new_accumulator.droppable_accumulators
+                              Droppable Accumulators].
+ \n定义一个动作,在该累加器被删除时执行。请见 [link accumulators.user_s_guide.the_accumulators_framework.extending_the_accumulators_framework.defining_a_new_accumulator.droppable_accumulators 可删除累加器]。]]
+]
+
+[h3 Accessing Other Accumulators in the Set 访问集合中的其它累加器]
+
+Some accumulators depend on other accumulators within the same accumulator set. In those +cases, it is necessary to be able to access those other accumulators. To make this possible, +the _accumulator_set_ passes a reference to itself when invoking the member functions of +its contained accumulators. It can be accessed by using the special `accumulator` key with
+the argument pack. Consider how we might implement `mean_accumulator`:
+\n有些累加器要依赖于同一个累加器集中的其它累加器。这时,它需要可以访问那些 其它累加器。 +为此,_accumulator_set_ 在执行所含累加器的成员函数时会传入一个它自身的引 用。 +它可以通过对参数包使用特定的 `accumulator` 键来访问。看一下我们可能会如何实 现 `mean_accumulator`:
+
+    // Mean == (Sum / Count) 平均值 == (总和 / 数量)
+    template<typename Sample>
+    struct mean_accumulator : accumulator_base
+    {
+        typedef Sample result_type;
+        mean_accumulator(dont_care) {}
+
+        template<typename Args>
+        result_type result(Args const &args) const
+        {
+            return sum(args[accumulator]) / count(args[accumulator]);
+        }
+    };
+
+`mean` depends on the `sum` and `count` accumulators. (We'll see in the next section how +to specify these dependencies.) The result of the mean accumulator is merely the result of +the sum accumulator divided by the result of the count accumulator. Consider how we write +that: `sum(args[accumulator]) / count(args[accumulator])`. The expression `args[accumulator]` +evaluates to a reference to the _accumulator_set_ that contains this `mean_accumulator`. It +also contains the `sum` and `count` accumulators, and we can access their results with the
+extractors defined for those features: `sum` and `count`.
+\n `mean` 依赖于 `sum` 和 `count` 累加器。(在下一节我们将看到如何指定这些依 赖关系)。 +mean 累加器的结果不过是 sum 累加器的结果除以 count 累加器的结果。看看我们是 如何写的: +`sum(args[accumulator]) / count(args[accumulator])`。表达式 `args[accumulator]` +被求值为包含这个 `mean_accumulator` 的 _accumulator_set_ 的引用。它同时还包 含了 `sum` +和 `count` 累加器,所以我们可以通过为特征 `sum` 和 `count` 所定义的提取器来 访问它们的结果。
+
+[note Accumulators that inherit from _accumulator_base_ get an empty `operator ()`, so
+ accumulators like `mean_accumulator` above need not define one.
+ \n继承自 _accumulator_base_ 的累加器得到一个空的 `operator ()`, 因此象上述
+ `mean_accumulator` 这样的累加器无需再定义一个。]
+
+All the member functions that accept an argument pack have access to the enclosing
+_accumulator_set_ via the `accumulator` key, including the constructor. The
+accumulators within the set are constructed in an order determined by their interdependencies. +As a result, it is safe for an accumulator to access one on which it depends during construction. +\n所有接受参数包的成员函数都可以通过 `accumulator` 键访问它所在的 _accumulator_set_, +包含构造函数。累加器集中的累加器是按照一个由它们的依赖关系所决定的顺序来构 造的。
+因此,累加器在构造期间访问一个它所依赖的累加器是安全的。
+
+[h3 Infix Notation and the Numeric Operators Sub-Library 中缀表示法和数学操 作符子库]
+
+Although not necessary, it can be a good idea to put your accumulator implementations in +the `boost::accumulators::impl` namespace. This namespace pulls in any operators defined +in the `boost::numeric::operators` namespace with a using directive. The Numeric Operators +Sub-Library defines some additional overloads that will make your accumulators work with
+all sorts of data types.
+\n虽然不是必须,但是将你的累加器实现置于 `boost::accumulators::impl` 名字空 间下是一个好主意。 +这个名字空间通过 using 指示符注入了在 `boost::numeric::operators` 名字空间 中定义的所有操作符。 +数学操作符子库定义了一些额外的重载,这样可以让你的累加器与所有数据类型共同 工作。
+
+Consider `mean_accumulator` defined above. It divides the sum of the samples by the count. +The type of the count is `std::size_t`. What if the sample type doesn't define division by +`std::size_t`? That's the case for `std::complex<>`. You might think that if the sample type +is `std::complex<>`, the code would not work, but in fact it does. That's because +Numeric Operators Sub-Library defines an overloaded `operator/` for `std::complex<>` +and `std::size_t`. This operator is defined in the `boost::numeric::operators` namespace and +will be found within the `boost::accumulators::impl` namespace. That's why it's a good idea
+to put your accumulators there.
+\n看一下前面定义的 `mean_accumulator`。它要将样本的总和除以数量。数量的类型 是 `std::size_t`。 +如果样本类型没有定义与 `std::size_t` 的除法,那会怎样?对于 `std::complex<>` 就是如此。 +你可能想,如果样本类型是 `std::complex<>`,这段代码将不能工作,但事实上它可 以。 +这是因为数学操作符子库为 `std::complex<>` 和 `std::size_t` 定义了一个重载 的 `operator/`。 +这个操作符定义于 `boost::numeric::operators` 名字空间中,可以在 `boost::accumulators::impl`
+名字空间内查找到。这就是为什么说将你的累加器放在那里是一个好主意的原因。
+
+[h3 Droppable Accumulators 可删除累加器]
+
+The term "droppable" refers to an accumulator that can be removed from the _accumulator_set_. +You can request that an accumulator be made droppable by using the _droppable_ class template.
+\n术语 "可删除" 是指一个累加器可以从 _accumulator_set_ 中删掉。
+你可以用 _droppable_ 类模板来指定一个累加器是可删除的。
+
+    // calculate sum and count, make sum droppable:
+    // 计算 sum 和 count,把 sum 定义为可删除:
+ accumulator_set< double, features< tag::count, droppable<tag::sum> > > acc;
+
+    // add some data 加入一些数据
+    acc(3.0);
+    acc(2.0);
+
+    // drop the sum (sum is 5 here) 删除 sum (现在的总和为5)
+    acc.drop<tag::sum>();
+
+    // add more data 再加入一些数据
+    acc(1.0);
+
+    // This will display "3" and "5"
+    // 将显示 "3" 和 "5"
+    std::cout << count(acc) << ' ' << sum(acc);
+
+Any accumulators that get added to an accumulator set in order to satisfy
+dependencies on droppable accumulators are themselves droppable. Consider
+the following accumulator:
+\n为了满足某些可删除累加器的依赖关系而自动加入到累加器集中的累加器,其本身 也是可删除的。
+考虑以下累加器:
+
+    // Sum is not droppable. Mean is droppable. Count, brought in to
+    // satisfy mean's dependencies, is implicitly droppable, too.
+ // Sum 不是可删除的。Mean 是可删除的。为了满足 mean 的依赖关系而带入的 Count 也是可删除的。 + accumulator_set< double, features< tag::sum, droppable<tag::mean> > > acc;
+
+`mean` depends on `sum` and `count`. Since `mean` is droppable, so too is `count`. +However, we have explictitly requested that `sum` be not droppable, so it isn't. Had +we left `tag::sum` out of the above declaration, the `sum` accumulator would have
+been implicitly droppable.
+\n`mean` 依赖于 `sum` 和 `count`。由于 `mean` 是可删除的,所以 `count` 也 是。但是, +我们显式指定了 `sum` 是不可删除的,所以它不是。如果我们在上述声明中去掉 `tag::sum`,
+则 `sum` 累加器也将是可删除的。
+
+A droppable accumulator is reference counted, and is only really dropped after all the +accumulators that depend on it have been dropped. This can lead to some surprising
+behavior in some situations.
+\n可删除累加器是引用计数的,它只在所有依赖于它的累加器都被删除后才真正删 除。
+在某些情况下可能会导致一些令人惊讶的行为。
+
+    // calculate sum and mean, make mean droppable.
+    // 计算 sum 和 mean,其中 mean 是可删除的。
+ accumulator_set< double, features< tag::sum, droppable<tag::mean> > > acc;
+
+    // add some data 加入一些数据
+    acc(1.0);
+    acc(2.0);
+
+    // drop the mean. mean's reference count
+    // drops to 0, so it's really dropped. So
+    // too, count's reference count drops to 0
+    // and is really dropped.
+    // 删除 mean。mean 的引用计数降至0,因此它被删除。
+    // 同样,count 的引用计数也降至0,所以也被删除。
+    acc.drop<tag::mean>();
+
+    // add more data. Sum continues to accumulate!
+    // 再加入一些数据。Sum 继续进行累加!
+    acc(3.0);
+
+    // This will display "6 2 3"
+    // 以下将打印 "6 2 3"
+    std::cout << sum(acc) << ' '
+              << count(acc) << ' '
+              << mean(acc);
+
+Note that at the point at which `mean` is dropped, `sum` is 3, `count` is 2, and +therefore `mean` is 1.5. But since `sum` continues to accumulate even after `mean` +has been dropped, the value of `mean` continues to change. If you want to remember +the value of `mean` at the point it is dropped, you should save its value into
+a local variable.
+\n留意 `mean` 被删除的时间点,此时 `sum` 为 3,`count` 为 2,因此 `mean` 为 1.5。
+但是由于 `sum` 在 `mean` 被删除之后继续累加,所以 `mean` 的值会继续变化。
+如果你想在 `mean` 被删除的时候记住它的值,你应该将它的值保存在一个局部变量 中。
+
+The following rules more precisely specify how droppable and non-droppable
+accumulators behave within an accumulator set.
+\n以下规则更好地说明了在一个累加器集内部的可删除累加器和不可删除累加器的行 为。
+
+* There are two types of accumulators: droppable and non-droppable.
+  The default is non-droppable.
+  \n有两类累加器:可删除的和不可删除的。缺省是不可删除的。
+* For any feature `X`, both `X` and `droppable<X>` satisfy the `X` dependency.
+  \n对于任意特征 `X`,`X` 和 `droppable<X>` 都满足 `X` 的依赖关系。
+* If feature `X` depends on `Y` and `Z`, then `droppable<X>` depends on
+  `droppable<Y>` and `droppable<Z>`.
+  \n如果特征 `X` 依赖于 `Y` 和 `Z`,则 `droppable<X>` 依赖于 `droppable<Y>`
+  和 `droppable<Z>`。
+* All accumulators have `add_ref()` and `drop()` member functions.
+  \n所有累加器都有 `add_ref()` 和 `drop()` 成员函数。
+* For non-droppable accumulators, `drop()` is a no-op, and `add_ref()`
+  invokes `add_ref()` on all accumulators corresponding to the features
+  upon which the current accumulator depends.
+  \n对于不可删除的累加器,`drop()` 是空操作,而 `add_ref()`
+  则对当前累加器所依赖的所有特征的累加器执行 `add_ref()`。
+* Droppable accumulators have a reference count and define `add_ref()`
+  and `drop()` to manipulate the reference count.
+ \n可删除的累加器有一个引用计数,并定义了 `add_ref()` 和 `drop()` 来维护该 引用计数。
+* For droppable accumulators, `add_ref()` increments the accumulator's
+  reference count, and also `add_ref()`'s the accumulators corresponding
+  to the features upon which the current accumulator depends.
+  \n对于可删除累加器,`add_ref()` 递增该累加器的引用计数,
+  并对当前累加器所依赖的所有特征的累加器执行 `add_ref()`。
+* For droppable accumulators, `drop()` decrements the accumulator's
+  reference count, and also `drop()`'s the accumulators corresponding to
+  the features upon which the current accumulator depends.
+  \n对于可删除累加器,`drop()` 递减该累加器的引用计数,
+  并对当前累加器所依赖的所有特征的累加器执行 `drop()`。
+* The accumulator_set constructor walks the list of *user-specified*
+  features and `add_ref()`'s the accumulator that corresponds to each of
+  them. (Note: that means that an accumulator that is not user-specified
+  but in the set merely to satisfy a dependency will be dropped as soon
+  as all its dependencies have been dropped. Ones that have been user
+  specified are not dropped until their dependencies have been
+  dropped *and* the user has explicitly dropped the accumulator.)
+  \n accumulator_set的构造函数遍历*用户指定*特征的列表,并对其中每一个
+ 所对应的累加器执行 `add_ref()`。(注:这意味着如果一个累加器不是用户指定 的, + 只是为了满足依赖关系而存在的,则当所有依赖它的累加器被删除时,它就会立即 被删除。 + 而对于用户指定的累加器,则直到依赖它的所有累加器被删除且用户显式删除该累 加器时,
+  才被删除。)
+* Droppable accumulators check their reference count in their
+  accumulate member function. If the reference count is 0, the function
+  is a no-op.
+  \n可删除累加器在它们的累加成员函数中检查其引用计数。如果引用计数为0,
+  则函数为空操作。
+* Users are not allowed to drop a feature that is not user-specified and
+  marked as droppable.
+  \n用户不允许删除不是用户指定的和未被标记为可删除的特征。
+
+And as an optimization:
+\n作为一种优化,有:
+
+* If the user specifies the non-droppable feature `X`, which depends on `Y`
+  and `Z`, then the accumulators for `Y` and `Z` can be safely made
+  non-droppable, as well as any accumulators on which they depend.
+  \n如果用户指定了一个不可删除特征 `X`,它依赖于 `Y` 和 `Z`,则 `Y` 和 `Z`
+  的累加器可以安全地设为不可删除,它们所依赖的任何累加器也是如此。
+
+[endsect]
+
+[section Defining a New Feature 定义新的特征]
+
+Once we have implemented an accumulator, we must define a feature for it so
+that users can specify the feature when declaring an _accumulator_set_. We
+typically put the features into a nested namespace, so that later we can
+define an extractor of the same name. All features must satisfy the
+[link accumulators.user_s_guide.the_accumulators_framework.concepts.feature_concept
+Feature Concept]. Using _depends_on_ makes satisfying the concept simple.
+Below is an example of a feature definition.
+\n一旦我们完成了一个累加器,我们就必须为它定义一个特征,这样用户才可以在声 +_accumulator_set_ 时指定这个特征。我们应该将这个特征置于一个嵌套的名字空间 中,
+这样稍后我们就可以定义一个同名的提取器。所有特征都必须满足
+[link accumulators.user_s_guide.the_accumulators_framework.concepts.feature_concept 特征概念]。
+使用 _depends_on_ 就可以很简单地满足该概念。以下是一个特征定义的例子。
+
+    namespace boost { namespace accumulators { namespace tag {
+
+ struct mean // Features should inherit from depends_on<> to specify dependencies + : depends_on< count, sum > // 特征应继承自 depends_on<> 以指定 依赖关系
+    {
+        // Define a nested typedef called 'impl' that specifies which
+        // accumulator implements this feature.
+ // 定义一个名为 'impl' 的嵌套 typedef,指定哪一个累加器实现了这个特 征。
+        typedef accumulators::impl::mean_accumulator< mpl::_1 > impl;
+    };
+
+    }}}
+
+The only two things we must do to define the `mean` feature is to specify the +dependencies with _depends_on_ and define the nested `impl` typedef. Even features +that have no dependencies should inherit from _depends_on_. The nested `impl` type
+must be an _mpl_lambda_expression_. The result of
+`mpl::apply< impl, _sample_type_, _weight_type_ >::type` must be
+be the type of the accumulator that implements this feature. The use of _mpl_
+placeholders like `mpl::_1` make it especially easy to make a template such
+as `mean_accumulator<>` an _mpl_lambda_expression_. Here, `mpl::_1` will be
+replaced with the sample type. Had we used `mpl::_2`, it would have been replaced
+with the weight type.
+\n在定义 `mean` 特征时,我们必须要做的两件事是,用 _depends_on_ 指定依赖关 系和定义嵌套的
+`impl` typedef。即使是没有依赖关系的特征,也要继承自 _depends_on_。
+嵌套的 `impl` 类型必须是一个 _mpl_lambda_expression_。
+`mpl::apply< impl, sample-type, weight-type >::type` 的结果必须是实现这一特 征的累加器。 +使用象 `mpl::_1` 这样的 _mpl_ 占位符可以很容易地将象 `mean_accumulator<>` 这样的模板变为 +_mpl_lambda_expression_。在这里,`mpl::_1` 将被样本类型所替换。如果我们使用 了 `mpl::_2`,
+它将会被权重类型所替换。
+
+What about accumulator types that are not templates? If you have a `foo_accumulator`
+which is a plain struct and not a template, you could turn it into an
+_mpl_lambda_expression_ using `mpl::always<>`, like this:
+\n那么对于非模板的累加器类型又该如何?如果你有一个 `foo_accumulator`,它是 一个简单结构而非模板,
+你可以用 `mpl::always<>` 将它转为 _mpl_lambda_expression_,象这样:
+
+    // An MPL lambda expression that always evaluates to
+    // foo_accumulator:
+    // 一个 MPL Lambda 表达式,它总是被求值为 foo_accumulator:
+    typedef mpl::always< foo_accumulator > impl;
+
+If you are ever unsure, or if you are not comfortable with MPL lambda expressions,
+you could always define `impl` explicitly:
+\n如果你不太确定,或者如果你不适应 MPL lambda 表达式,你总可以显式地定义 `impl` 吧:
+
+    // Same as 'typedef mpl::always< foo_accumulator > impl;'
+    // 与 'typedef mpl::always< foo_accumulator > impl;' 一样
+    struct impl
+    {
+        template< typename Sample, typename Weight >
+        struct apply
+        {
+            typedef foo_accumulator type;
+        };
+    };
+
+Here, `impl` is a binary [@../../libs/mpl/doc/refmanual/metafunction-class.html +MPL Metafunction Class], which is a kind of _mpl_lambda_expression_. The nested +`apply<>` template is part of the metafunction class protocol and tells MPL how
+to to build the accumulator type given the sample and weight types.
+\n在这里,`impl` 是一个二元 [@../../libs/mpl/doc/refmanual/metafunction-class.html
+MPL 元函数类],它是 _mpl_lambda_expression_ 中的一种。嵌套的 `apply<>`
+模板是元函数类协议的一部分,它告诉 MPL 如何根据给定的样本类型和权重类型来构 建累加器类型。
+
+All features must also provide a nested `is_weight_accumulator` typedef. It must
+be either `mpl::true_` or `mpl::false_`. _depends_on_ provides a default of
+`mpl::false_` for all features that inherit from it, but that can be overridden +(or hidden, technically speaking) in the derived type. When the feature represents
+an accumulation of information about the weights instead of the samples, we
+can mark this feature as such with `typedef mpl::true_ is_weight_accumulator;`. +The weight accumulators are made external if the weight type is specified using
+the _external_ template.
+\n所有特征都必须提供一个嵌套的 `is_weight_accumulator typedef`。它必须是 `mpl::true_` +或 `mpl::false_`。_depends_on_ 为所有派生自它的特征提供了一个缺省值 `mpl::false_`, +不过它是可以在派生类中被覆写的(或隐藏,技术上说)。当一个特征表示的是关于权 重信息而不是样本信息的累加时,
+我们可以用 `typedef mpl::true_ is_weight_accumulator;` 来标记这一特征。
+如果权重类型是用 _external_ 模板指定的,则加权累加器是在外部制造的。
+
+[endsect]
+
+[section Defining a New Extractor 定义新的提取器]
+
***The diff for this file has been truncated for email.***
=======================================
--- /dev/null
+++ /trunk/libs/accumulators/example/Jamfile.v2 Mon Dec 28 23:05:14 2009
@@ -0,0 +1,11 @@
+# (C) Copyright 2004: Eric Niebler
+# 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)
+
+exe example
+    :
+        main.cpp
+    :
+        <include>../../..
+        <include>$(BOOST_ROOT)
+    ;
=======================================
--- /dev/null
+++ /trunk/libs/accumulators/example/example.vcproj     Mon Dec 28 23:05:14 2009
@@ -0,0 +1,396 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="7.10"
+       Name="example"
+       ProjectGUID="{57D2AB8B-8CBB-4B28-921E-C6916109B843}"
+       Keyword="Win32Proj">
+       <Platforms>
+               <Platform
+                       Name="Win32"/>
+       </Platforms>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="Debug"
+                       IntermediateDirectory="Debug"
+                       ConfigurationType="1"
+                       CharacterSet="2">
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               
AdditionalIncludeDirectories="..\..\..;$(BOOST_ROOT)"
+                               PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+                               MinimalRebuild="TRUE"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="5"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="TRUE"
+                               DebugInformationFormat="3"/>
+                       <Tool
+                               Name="VCCustomBuildTool"/>
+                       <Tool
+                               Name="VCLinkerTool"
+                               OutputFile="$(OutDir)/example.exe"
+                               LinkIncremental="2"
+                               GenerateDebugInformation="TRUE"
+                               ProgramDatabaseFile="$(OutDir)/example.pdb"
+                               SubSystem="1"
+                               TargetMachine="1"/>
+                       <Tool
+                               Name="VCMIDLTool"/>
+                       <Tool
+                               Name="VCPostBuildEventTool"/>
+                       <Tool
+                               Name="VCPreBuildEventTool"/>
+                       <Tool
+                               Name="VCPreLinkEventTool"/>
+                       <Tool
+                               Name="VCResourceCompilerTool"/>
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"/>
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"/>
+                       <Tool
+                               Name="VCWebDeploymentTool"/>
+                       <Tool
+                               Name="VCManagedWrapperGeneratorTool"/>
+                       <Tool
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory="Release"
+                       IntermediateDirectory="Release"
+                       ConfigurationType="1"
+                       CharacterSet="2">
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               
AdditionalIncludeDirectories="..\..\..;$(BOOST_ROOT)"
+                               PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+                               RuntimeLibrary="4"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="TRUE"
+                               DebugInformationFormat="3"/>
+                       <Tool
+                               Name="VCCustomBuildTool"/>
+                       <Tool
+                               Name="VCLinkerTool"
+                               OutputFile="$(OutDir)/example.exe"
+                               LinkIncremental="1"
+                               GenerateDebugInformation="TRUE"
+                               SubSystem="1"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               TargetMachine="1"/>
+                       <Tool
+                               Name="VCMIDLTool"/>
+                       <Tool
+                               Name="VCPostBuildEventTool"/>
+                       <Tool
+                               Name="VCPreBuildEventTool"/>
+                       <Tool
+                               Name="VCPreLinkEventTool"/>
+                       <Tool
+                               Name="VCResourceCompilerTool"/>
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"/>
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"/>
+                       <Tool
+                               Name="VCWebDeploymentTool"/>
+                       <Tool
+                               Name="VCManagedWrapperGeneratorTool"/>
+                       <Tool
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+                       
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+                       <File
+                               RelativePath=".\main.cpp">
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
+                       
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+                       <File
+                               
RelativePath="..\..\..\boost\accumulators\accumulators.hpp">
+                       </File>
+                       <File
+                               
RelativePath="..\..\..\boost\accumulators\accumulators_fwd.hpp">
+                       </File>
+                       <File
+                               
RelativePath="..\..\..\boost\accumulators\statistics.hpp">
+                       </File>
+                       <File
+                               
RelativePath="..\..\..\boost\accumulators\statistics_fwd.hpp">
+                       </File>
+                       <Filter
+                               Name="statistics"
+                               Filter="">
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\statistics\count.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\statistics\covariance.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\statistics\density.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\statistics\error_of.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\error_of_mean.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\extended_p_square.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\extended_p_square_quantile.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\statistics\kurtosis.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\statistics\max.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\statistics\mean.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\statistics\median.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\statistics\min.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\statistics\moment.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\p_square_cumulative_distribution.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\p_square_quantile.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\peaks_over_threshold.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\pot_quantile.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\pot_tail_mean.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\statistics\skewness.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\statistics\stats.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\statistics\sum.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\statistics\tail.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\statistics\tail_mean.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\tail_quantile.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\tail_variate.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\tail_variate_means.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\times2_iterator.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\statistics\variance.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\weighted_covariance.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\weighted_density.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\weighted_extended_p_square.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\weighted_kurtosis.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\weighted_mean.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\weighted_median.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\weighted_moment.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\weighted_p_square_cumulative_distribution.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\weighted_p_square_quantile.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\weighted_peaks_over_threshold.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\weighted_skewness.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\weighted_sum.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\weighted_tail_mean.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\weighted_tail_quantile.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\weighted_tail_variate_means.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\statistics\weighted_variance.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\statistics\with_error.hpp">
+                               </File>
+                               <Filter
+                                       Name="variates"
+                                       Filter="">
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\statistics\variates\covariate.hpp">
+                                       </File>
+                               </Filter>
+                               <Filter
+                                       Name="parameters"
+                                       Filter="">
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\statistics\parameters\quantile_probability.hpp">
+                                       </File>
+                               </Filter>
+                       </Filter>
+                       <Filter
+                               Name="framework"
+                               Filter="">
+                               <File
+ RelativePath="..\..\..\boost\accumulators\framework\accumulator_base.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\framework\accumulator_concept.hpp">
+                               </File>
+                               <File
+ RelativePath="..\..\..\boost\accumulators\framework\accumulator_set.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\framework\depends_on.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\framework\external.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\framework\extractor.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\framework\features.hpp">
+                               </File>
+                               <Filter
+                                       Name="parameters"
+                                       Filter="">
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\framework\parameters\accumulator.hpp">
+                                       </File>
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\framework\parameters\sample.hpp">
+                                       </File>
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\framework\parameters\weight.hpp">
+                                       </File>
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\framework\parameters\weights.hpp">
+                                       </File>
+                               </Filter>
+                               <Filter
+                                       Name="accumulators"
+                                       Filter="">
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\framework\accumulators\droppable_accumulator.hpp">
+                                       </File>
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\framework\accumulators\external_accumulator.hpp">
+                                       </File>
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\framework\accumulators\reference_accumulator.hpp">
+                                       </File>
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\framework\accumulators\value_accumulator.hpp">
+                                       </File>
+                               </Filter>
+                       </Filter>
+                       <Filter
+                               Name="numeric"
+                               Filter="">
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\numeric\functional.hpp">
+                               </File>
+                               <File
+                                       
RelativePath="..\..\..\boost\accumulators\numeric\functional_fwd.hpp">
+                               </File>
+                               <Filter
+                                       Name="functional"
+                                       Filter="">
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\numeric\functional\complex.hpp">
+                                       </File>
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\numeric\functional\valarray.hpp">
+                                       </File>
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\numeric\functional\vector.hpp">
+                                       </File>
+                               </Filter>
+                               <Filter
+                                       Name="detail"
+                                       Filter="">
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\numeric\detail\function1.hpp">
+                                       </File>
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\numeric\detail\function2.hpp">
+                                       </File>
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\numeric\detail\function3.hpp">
+                                       </File>
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\numeric\detail\function4.hpp">
+                                       </File>
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\numeric\detail\function_n.hpp">
+                                       </File>
+                                       <File
+ RelativePath="..\..\..\boost\accumulators\numeric\detail\pod_singleton.hpp">
+                                       </File>
+                               </Filter>
+                       </Filter>
+               </Filter>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
=======================================
--- /dev/null
+++ /trunk/libs/accumulators/example/main.cpp   Mon Dec 28 23:05:14 2009
@@ -0,0 +1,176 @@
+///////////////////////////////////////////////////////////////////////////////
+// main.hpp
+//
+//  Copyright 2005 Eric Niebler. 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)
+
+#include <iostream>
+#include <algorithm>
+#include <boost/ref.hpp>
+#include <boost/bind.hpp>
+#include <boost/array.hpp>
+#include <boost/foreach.hpp>
+#include <boost/accumulators/accumulators.hpp>
+#include <boost/accumulators/statistics.hpp>
+
+using namespace boost;
+using namespace boost::accumulators;
+
+// Helper that uses BOOST_FOREACH to display a range of doubles
+template<typename Range>
+void output_range(Range const &rng)
+{
+    bool first = true;
+    BOOST_FOREACH(double d, rng)
+    {
+        if(!first) std::cout << ", ";
+        std::cout << d;
+        first = false;
+    }
+    std::cout << '\n';
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// example1
+//
+//  Calculate some useful stats using accumulator_set<> and std::for_each()
+//
+void example1()
+{
+    accumulator_set<
+        double
+      , stats<tag::min, tag::mean(immediate), tag::sum, tag::moment<2> >
+    > acc;
+
+    boost::array<double, 4> data = {0., 1., -1., 3.14159};
+
+    // std::for_each pushes each sample into the accumulator one at a
+    // time, and returns a copy of the accumulator.
+    acc = std::for_each(data.begin(), data.end(), acc);
+
+    // The following would be equivalent, and could be more efficient
+    // because it doesn't pass and return the entire accumulator set
+    // by value.
+    //std::for_each(data.begin(), data.end(), bind<void>(ref(acc), _1));
+
+ std::cout << " min""(acc) = " << (min)(acc) << std::endl; // Extra quotes are to prevent complaints from Boost inspect tool
+    std::cout << "  mean(acc)       = " << mean(acc) << std::endl;
+
+    // since mean depends on count and sum, we can get their results, too.
+    std::cout << "  count(acc)      = " << count(acc) << std::endl;
+    std::cout << "  sum(acc)        = " << sum(acc) << std::endl;
+ std::cout << " moment<2>(acc) = " << accumulators::moment<2>(acc) << std::endl;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// example2
+//
+//  Calculate some tail statistics. This demonstrates how to specify
+//  constructor and accumulator parameters. Note that the tail statistics
+//  return multiple values, which are returned in an iterator_range.
+//
+//  It pushes data in and displays the intermediate results to demonstrate
+//  how the tail statistics are updated.
+void example2()
+{
+    // An accumulator which tracks the right tail (largest N items) and
+    // some data that are covariate with them. N == 4.
+    accumulator_set<
+        double
+      , stats<tag::tail_variate<double, tag::covariate1, right> >
+    > acc(tag::tail<right>::cache_size = 4);
+
+    acc(2.1, covariate1 = .21);
+    acc(1.1, covariate1 = .11);
+    acc(2.1, covariate1 = .21);
+    acc(1.1, covariate1 = .11);
+
+    std::cout << "  tail            = "; output_range(tail(acc));
+    std::cout << "  tail_variate    = "; output_range(tail_variate(acc));
+    std::cout << std::endl;
+
+    acc(21.1, covariate1 = 2.11);
+    acc(11.1, covariate1 = 1.11);
+    acc(21.1, covariate1 = 2.11);
+    acc(11.1, covariate1 = 1.11);
+
+    std::cout << "  tail            = "; output_range(tail(acc));
+    std::cout << "  tail_variate    = "; output_range(tail_variate(acc));
+    std::cout << std::endl;
+
+    acc(42.1, covariate1 = 4.21);
+    acc(41.1, covariate1 = 4.11);
+    acc(42.1, covariate1 = 4.21);
+    acc(41.1, covariate1 = 4.11);
+
+    std::cout << "  tail            = "; output_range(tail(acc));
+    std::cout << "  tail_variate    = "; output_range(tail_variate(acc));
+    std::cout << std::endl;
+
+    acc(32.1, covariate1 = 3.21);
+    acc(31.1, covariate1 = 3.11);
+    acc(32.1, covariate1 = 3.21);
+    acc(31.1, covariate1 = 3.11);
+
+    std::cout << "  tail            = "; output_range(tail(acc));
+    std::cout << "  tail_variate    = "; output_range(tail_variate(acc));
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// example3
+//
+// Demonstrate how to calculate weighted statistics. This example demonstrates
+//  both a simple weighted statistical calculation, and a more complicated
+//  calculation where the weight statistics are calculated and stored in an
+//  external weight accumulataor.
+void example3()
+{
+    // weight == double
+    double w = 1.;
+
+    // Simple weighted calculation
+    {
+        // stats that depend on the weight are made external
+        accumulator_set<double, stats<tag::mean>, double> acc;
+
+        acc(0., weight = w);
+        acc(1., weight = w);
+        acc(-1., weight = w);
+        acc(3.14159, weight = w);
+
+        std::cout << "  mean(acc)       = " << mean(acc) << std::endl;
+    }
+
+    // Weighted calculation with an external weight accumulator
+    {
+        // stats that depend on the weight are made external
+        accumulator_set<double, stats<tag::mean>, external<double> > acc;
+
+        // Here's an external weight accumulator
+ accumulator_set<void, stats<tag::sum_of_weights>, double> weight_acc;
+
+        weight_acc(weight = w); acc(0., weight = w);
+        weight_acc(weight = w); acc(1., weight = w);
+        weight_acc(weight = w); acc(-1., weight = w);
+        weight_acc(weight = w); acc(3.14159, weight = w);
+
+ std::cout << " mean(acc) = " << mean(acc, weights = weight_acc) << std::endl;
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// main
+int main()
+{
+    std::cout << "Example 1:\n";
+    example1();
+
+    std::cout << "\nExample 2:\n";
+    example2();
+
+    std::cout << "\nExample 3:\n";
+    example3();
+
+    return 0;
+}
=======================================
--- /dev/null
+++ /trunk/libs/algorithm/string/doc/Jamfile.v2 Mon Dec 28 23:05:14 2009
@@ -0,0 +1,57 @@
+# Boost string_algo library documentation Jamfile ---------------------------------
+#
+#  Copyright Pavol Droba 2002-2003. Use, modification and
+#  distribution is subject to the Boost Software License, Version
+#  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#  http://www.boost.org/LICENSE_1_0.txt)
+#
+# See http://www.boost.org for updates, documentation, and revision history.
+
+import toolset ;
+toolset.using doxygen ;
+
+boostbook string_algo : string_algo.xml autodoc
+       :
+ <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
+       ;
+
+doxygen autodoc
+    :
+    [ glob ../../../../boost/algorithm/string.hpp ]
+    [ glob ../../../../boost/algorithm/string_regex.hpp ]
+
+    [ glob ../../../../boost/algorithm/string/classification.hpp ]
+    [ glob ../../../../boost/algorithm/string/iterator_range.hpp ]
+    [ glob ../../../../boost/algorithm/string/sequence_traits.hpp ]
+    [ glob ../../../../boost/algorithm/string/std_containers_traits.hpp ]
+    [ glob ../../../../boost/algorithm/string/concept.hpp ]
+    [ glob ../../../../boost/algorithm/string/compare.hpp ]
+    [ glob ../../../../boost/algorithm/string/constants.hpp ]
+    [ glob ../../../../boost/algorithm/string/case_conv.hpp ]
+    [ glob ../../../../boost/algorithm/string/find.hpp ]
+    [ glob ../../../../boost/algorithm/string/finder.hpp ]
+    [ glob ../../../../boost/algorithm/string/find_iterator.hpp ]
+    [ glob ../../../../boost/algorithm/string/trim.hpp ]
+    [ glob ../../../../boost/algorithm/string/predicate.hpp ]
+    [ glob ../../../../boost/algorithm/string/split.hpp ]
+    [ glob ../../../../boost/algorithm/string/iter_find.hpp ]
+    [ glob ../../../../boost/algorithm/string/erase.hpp ]
+    [ glob ../../../../boost/algorithm/string/join.hpp ]
+    [ glob ../../../../boost/algorithm/string/replace.hpp ]
+    [ glob ../../../../boost/algorithm/string/find_format.hpp ]
+    [ glob ../../../../boost/algorithm/string/formatter.hpp ]
+    [ glob ../../../../boost/algorithm/string/regex.hpp ]
+    [ glob ../../../../boost/algorithm/string/regex_find_format.hpp ]
+    :
+    <doxygen:param>HIDE_UNDOC_MEMBERS=YES
+    <doxygen:param>EXTRACT_PRIVATE=NO
+    <doxygen:param>ENABLE_PREPROCESSING=YES
+    <doxygen:param>MACRO_EXPANSION=YES
+    <doxygen:param>EXPAND_ONLY_PREDEF=YES
+    <doxygen:param>SEARCH_INCLUDES=YES
+ <doxygen:param>PREDEFINED="BOOST_STRING_TYPENAME=typename \"BOOST_STATIC_CONSTANT(type,var)=static const type var;\""
+    ;
+
+
+
+
=======================================
--- /dev/null
+++ /trunk/libs/algorithm/string/doc/concept.xml        Mon Dec 28 23:05:14 2009
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd";>
+
+<!-- Copyright (c) 2002-2006 Pavol Droba.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<section id="string_algo.concept" last-revision="$Date: 2008-06-19 08:07:24 -0400 (Thu, 19 Jun 2008) $">
+    <title>Concepts</title>
+
+    <using-namespace name="boost"/>
+    <using-namespace name="boost::algorithm"/>
+
+    <section>
+        <title>Definitions</title>
+
+        <table>
+            <title>Notation</title>
+            <tgroup cols="2" align="left">
+                <tbody>
+                    <row>
+                        <entry><code>F</code></entry>
+                        <entry>A type that is a model of Finder</entry>
+                    </row>
+                    <row>
+                        <entry><code>Fmt</code></entry>
+                        <entry>A type that is a model of Formatter</entry>
+                    </row>
+                    <row>
+                        <entry><code>Iter</code></entry>
+                        <entry>
+                            Iterator Type
+                        </entry>
+                    </row>
+                    <row>
+                        <entry><code>f</code></entry>
+                        <entry>Object of type <code>F</code></entry>
+                    </row>
+                    <row>
+                        <entry><code>fmt</code></entry>
+                        <entry>Object of type <code>Fmt</code></entry>
+                    </row>
+                    <row>
+                        <entry><code>i,j</code></entry>
+                        <entry>Objects of type <code>Iter</code></entry>
+                    </row>
+                    </tbody>
+            </tgroup>
+        </table>
+    </section>
+
+    <section id="string_algo.finder_concept">
+        <title>Finder Concept</title>
+
+        <para>
+ Finder is a functor which searches for an arbitrary part of a container. + The result of the search is given as an <classname>iterator_range</classname>
+            delimiting the selected part.
+        </para>
+
+        <table>
+            <title>Valid Expressions</title>
+            <tgroup cols="3" align="left">
+                <thead>
+                    <row>
+                        <entry>Expression</entry>
+                        <entry>Return Type</entry>
+                        <entry>Effects</entry>
+                    </row>
+                </thead>
+                <tbody>
+                    <row>
+                        <entry><code>f(i,j)</code></entry>
+ <entry>Convertible to <code>iterator_range&lt;Iter&gt;</code></entry> + <entry>Perform the search on the interval [i,j) and returns the result of the search</entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+
+        <para>
+ Various algorithms need to perform a search in a container and a Finder is a generalization of such + search operations that allows algorithms to abstract from searching. For instance, generic replace + algorithms can replace any part of the input, and the Finder is used to select the desired one.
+        </para>
+        <para>
+ Note, that it is only required that the finder works with a particular iterator type. However, + a Finder operation can be defined as a template, allowing the Finder to work with any iterator.
+        </para>
+        <para>
+            <emphasis role="bold">Examples</emphasis>
+        </para>
+        <para>
+            <itemizedlist>
+                <listitem>
+ Finder implemented as a class. This Finder always returns the whole input as a match. <code>operator()</code> + is templated, so that the finder can be used on any iterator type.
+
+                    <programlisting>
+struct simple_finder
+{
+    template&lt;typename ForwardIteratorT&gt;
+    boost::iterator_range&lt;ForwardIteratorT&gt; operator()(
+        ForwardIteratorT Begin,
+        ForwardIteratorT End )
+    {
+        return boost::make_range( Begin, End );
+    }
+};
+        </programlisting>
+                </listitem>
+                <listitem>
+ Function Finder. Finder can be any function object. That is, any ordinary function with the + required signature can be used as well. However, such a function can be used only for
+                    a specific iterator type.
+
+                    <programlisting>
+boost::iterator_range&lt;std::string&gt; simple_finder(
+    std::string::const_iterator Begin,
+    std::string::const_iterator End )
+{
+    return boost::make_range( Begin, End );
+}
+        </programlisting>
+                </listitem>
+            </itemizedlist>
+        </para>
+    </section>
+    <section id="string_algo.formatter_concept">
+        <title>Formatter concept</title>
+
+        <para>
+ Formatters are used by <link linkend="string_algo.replace">replace algorithms</link>.
+            They are used in close combination with finders.
+ A formatter is a functor, which takes a result from a Finder operation and transforms it in a specific way. + The operation of the formatter can use additional information provided by a specific finder, + for example <functionname>regex_formatter()</functionname> uses the match information from + <functionname>regex_finder()</functionname> to format the result of formatter operation.
+        </para>
+
+        <table>
+            <title>Valid Expressions</title>
+            <tgroup cols="3" align="left">
+                <thead>
+                    <row>
+                        <entry>Expression</entry>
+                        <entry>Return Type</entry>
+                        <entry>Effects</entry>
+                    </row>
+                </thead>
+                <tbody>
+                   <row>
+                        <entry><code>fmt(f(i,j))</code></entry>
+ <entry>A container type, accessible using container traits</entry> + <entry>Formats the result of the finder operation</entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+
+        <para>
+ Similarly to finders, formatters generalize format operations. When a finder is used to + select a part of the input, formatter takes this selection and performs some formating + on it. Algorithms can abstract from formating using a formatter.
+        </para>
+        <para>
+            <emphasis role="bold">Examples</emphasis>
+        </para>
+        <para>
+            <itemizedlist>
+                <listitem>
+ Formatter implemented as a class. This Formatter does not perform any formating and
+                    returns the match, repackaged. <code>operator()</code>
+ is templated, so that the Formatter can be used on any Finder type.
+
+                    <programlisting>
+struct simple_formatter
+{
+    template&lt;typename FindResultT&gt;
+    std::string operator()( const FindResultT&amp; Match )
+    {
+        std::string Temp( Match.begin(), Match.end() );
+        return Temp;
+    }
+};
+                </programlisting>
+                </listitem>
+                <listitem>
+ Function Formatter. Similarly to Finder, Formatter can be any function object. + However, as a function, it can be used only with a specific Finder type.
+
+                    <programlisting>
+std::string simple_formatter( boost::iterator_range&lt;std::string::const_iterator&gt;&amp; Match )
+{
+    std::string Temp( Match.begin(), Match.end() );
+    return Temp;
+}
+                    </programlisting>
+                </listitem>
+            </itemizedlist>
+        </para>
+     </section>
+</section>
=======================================
--- /dev/null
+++ /trunk/libs/algorithm/string/doc/credits.xml        Mon Dec 28 23:05:14 2009
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd";>
+
+<!-- Copyright (c) 2002-2006 Pavol Droba.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<section id="string_algo.credits" last-revision="$Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $">
+    <title>Credits</title>
+    <section id="string_algo.ack">
+        <title>Acknowledgments</title>
+        <para>
+ The author would like to thank everybody who gave suggestions and comments. Especially valuable + were the contributions of Thorsten Ottosen, Jeff Garland and the other boost members who participated + in the review process, namely David Abrahams, Daniel Frey, Beman Dawes, John Maddock, David B.Held, Pavel Vozenilek
+            and many other.
+        </para>
+        <para>
+ Additional thanks go to Stefan Slapeta and Toon Knapen, who have been very resourceful in solving various
+            portability issues.
+        </para>
+    </section>
+</section>
=======================================
--- /dev/null
+++ /trunk/libs/algorithm/string/doc/design.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd";>
+
+
+<!-- Copyright (c) 2002-2006 Pavol Droba.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<section id="string_algo.design" last-revision="$Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $">
+    <title>Design Topics</title>
+
+    <using-namespace name="boost"/>
+    <using-namespace name="boost::algorithm"/>
+
+    <section id="string_algo.string">
+        <title>String Representation</title>
+
+        <para>
+ As the name suggest, this library works mainly with strings. However, in the context of this library, + a string is not restricted to any particular implementation (like <code>std::basic_string</code>), + rather it is a concept. This allows the algorithms in this library to be reused for any string type,
+            that satisfies the given requirements.
+        </para>
+        <para>
+            <emphasis role="bold">Definition:</emphasis> A string is a
+ <ulink url="../../libs/range/doc/range.html">range</ulink> of characters accessible in sequential + ordered fashion. Character is any value type with "cheap" copying and assignment.
+        </para>
+        <para>
+ First requirement of string-type is that it must accessible using + <ulink url="../../libs/range/index.html">Boost.Range</ulink>. This facility allows to access + the elements inside the string in a uniform iterator-based fashion.
+            This is sufficient for our library
+        </para>
+        <para>
+ Second requirement defines the way in which the characters are stored in the string. Algorithms in + this library work with an assumption that copying a character is cheaper then allocating extra + storage to cache results. This is a natural assumption for common character types. Algorithms will + work even if this requirement is not satisfied, however at the cost of performance degradation.
+        <para>
+        </para>
+ In addition some algorithms have additional requirements on the string-type. Particularly, it is required + that an algorithm can create a new string of the given type. In this case, it is required that + the type satisfies the sequence (Std &sect;23.1.1) requirements.
+        </para>
+        <para>
+ In the reference and also in the code, requirement on the string type is designated by the name of + template argument. <code>RangeT</code> means that the basic range requirements must hold. + <code>SequenceT</code> designates extended sequence requirements.
+        </para>
+    </section>
+
+    <section id="string_algo.sequence_traits">
+        <title>Sequence Traits</title>
+
+        <para>
+ The major difference between <code>std::list</code> and <code>std::vector</code> is not in the interfaces + they provide, but rather in the inner details of the class and the way how it performs + various operations. The problem is that it is not possible to infer this difference from the
+            definitions of classes without some special mechanism.
+ However, some algorithms can run significantly faster with the knowledge of the properties
+            of a particular container.
+        </para>
+        <para>
+ Sequence traits allow one to specify additional properties of a sequence container (see Std.&sect;32.2). + These properties are then used by algorithms to select optimized handling for some operations.
+            The sequence traits are declared in the header
+ <headername>boost/algorithm/string/sequence_traits.hpp</headername>.
+        </para>
+
+        <para>
+            In the table C denotes a container and c is an object of C.
+        </para>
+        <table>
+            <title>Sequence Traits</title>
+            <tgroup cols="2" align="left">
+                <thead>
+                    <row>
+                        <entry>Trait</entry>
+                        <entry>Description</entry>
+                    </row>
+                </thead>
+                <tbody>
+                    <row>
+ <entry><classname>has_native_replace&lt;C&gt;</classname>::value</entry> + <entry>Specifies that the sequence has std::string like replace method</entry>
+                    </row>
+                    <row>
+ <entry><classname>has_stable_iterators&lt;C&gt;</classname>::value</entry>
+                        <entry>
+ Specifies that the sequence has stable iterators. It means, + that operations like <code>insert</code>/<code>erase</code>/<code>replace</code>
+                            do not invalidate iterators.
+                        </entry>
+                    </row>
+                    <row>
+ <entry><classname>has_const_time_insert&lt;C&gt;</classname>::value</entry>
+                        <entry>
+ Specifies that the insert method of the sequence has
+                            constant time complexity.
+                        </entry>
+                    </row>
+                    <row>
+ <entry><classname>has_const_time_erase&lt;C&gt;</classname>::value</entry>
+                        <entry>
+ Specifies that the erase method of the sequence has constant time complexity
+                        </entry>
+                    </row>
+                    </tbody>
+            </tgroup>
+        </table>
+
+        <para>
+ Current implementation contains specializations for std::list&lt;T&gt; and + std::basic_string&lt;T&gt; from the standard library and SGI's std::rope&lt;T&gt; and std::slist&lt;T&gt;.
+        </para>
+    </section>
+    <section id="string_algo.find">
+        <title>Find Algorithms</title>
+
+        <para>
+ Find algorithms have similar functionality to <code>std::search()</code> algorithm. They provide a different
+            interface which is more suitable for common string operations.
+ Instead of returning just the start of matching subsequence they return a range which is necessary + when the length of the matching subsequence is not known beforehand. + This feature also allows a partitioning of the input sequence into three
+            parts: a prefix, a substring and a suffix.
+        </para>
+        <para>
+ Another difference is an addition of various searching methods besides find_first, including find_regex.
+        </para>
+        <para>
+            It the library, find algorithms are implemented in terms of
+ <link linkend="string_algo.finder_concept">Finders</link>. Finders are used also by other facilities
+            (replace,split).
+ For convenience, there are also function wrappers for these finders to simplify find operations.
+        </para>
+        <para>
+ Currently the library contains only naive implementation of find algorithms with complexity + O(n * m) where n is the size of the input sequence and m is the size of the search sequence. + There are algorithms with complexity O(n), but for smaller sequence a constant overhead is + rather big. For small m &lt;&lt; n (m by magnitude smaller than n) the current implementation
+            provides acceptable efficiency.
+ Even the C++ standard defines the required complexity for search algorithm as O(n * m). + It is possible that a future version of library will also contain algorithms with linear
+            complexity as an option
+        </para>
+    </section>
+    <section id="string_algo.replace">
+        <title>Replace Algorithms</title>
+
+        <para>
+ The implementation of replace algorithms follows the layered structure of the library. The + lower layer implements generic substitution of a range in the input sequence. + This layer takes a <link linkend="string_algo.finder_concept">Finder</link> object and a + <link linkend="string_algo.formatter_concept">Formatter</link> object as an input. These two + functors define what to replace and what to replace it with. The upper layer functions + are just wrapping calls to the lower layer. Finders are shared with the find and split facility.
+        </para>
+        <para>
+ As usual, the implementation of the lower layer is designed to work with a generic sequence while
+            taking advantage of specific features if possible
+ (by using <link linkend="string_algo.sequence_traits">Sequence traits</link>)
+        </para>
+    </section>
+    <section id="string_algo.split">
+        <title>Find Iterators &amp; Split Algorithms</title>
+
+        <para>
+ Find iterators are a logical extension of the <link linkend="string_algo.find">find facility</link>. + Instead of searching for one match, the whole input can be iteratively searched for multiple matches. + The result of the search is then used to partition the input. It depends on the algorithms which parts + are returned as the result. They can be the matching parts (<classname>find_iterator</classname>) of the parts in
+            between (<classname>split_iterator</classname>).
+        </para>
+        <para>
+ In addition the split algorithms like <functionname>find_all()</functionname> and <functionname>split()</functionname> + can simplify the common operations. They use a find iterator to search the whole input and copy the
+            matches they found into the supplied container.
+        </para>
+    </section>
+    <section id="string_algo.exception">
+        <title>Exception Safety</title>
+
+        <para>
+ The library requires that all operations on types used as template + or function arguments provide the <emphasis>basic exception-safety guarantee</emphasis>. + In turn, all functions and algorithms in this library, except where stated + otherwise, will provide the <emphasis>basic exception-safety guarantee</emphasis>.
+            In other words:
+ The library maintains its invariants and does not leak resources in
+            the face of exceptions.  Some library operations give stronger
+            guarantees, which are documented on an individual basis.
+        </para>
+
+        <para>
+ Some functions can provide the <emphasis>strong exception-safety guarantee</emphasis>.
+            That means that following statements are true:
+            <itemizedlist>
+                <listitem>
+ If an exception is thrown, there are no effects other than those
+                    of the function
+                </listitem>
+                <listitem>
+ If an exception is thrown other than by the function, there are no effects
+                </listitem>
+            </itemizedlist>
+ This guarantee can be provided under the condition that the operations
+            on the types used for arguments for these functions either
+ provide the strong exception guarantee or do not alter the global state .
+         </para>
+        <para>
+ In the reference, under the term <emphasis>strong exception-safety guarantee</emphasis>, we mean the
+            guarantee as defined above.
+        </para>
+        <para>
+ For more information about the exception safety topics, follow this + <ulink url="http://www.boost.org/more/generic_exception_safety.html";>link</ulink>
+        </para>
+    </section>
+</section>
=======================================
--- /dev/null
+++ /trunk/libs/algorithm/string/doc/environment.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd";>
+
+<!-- Copyright (c) 2002-2006 Pavol Droba.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<section id="string_algo.env" last-revision="$Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $">
+    <title>Environment</title>
+    <section>
+        <title>Build</title>
+        <para>
+ The whole library is provided in headers. Regex variants of some algorithms, + however, are dependent on the <libraryname>Boost.Regex</libraryname> library. All such algorithms are + separated in <headername>boost/algorithm/string_regex.hpp</headername>. + If this header is used, the application must be linked with the <libraryname>Boost.Regex</libraryname>
+            library.
+        </para>
+    </section>
+
+    <section>
+        <title>Examples</title>
+        <para>
+ Examples showing the basic usage of the library can be found in the libs/algorithm/string/example + directory. There is a separate file for the each part of the library. Please follow the boost + build guidelines to build examples using the bjam. To successfully build regex examples
+            the <libraryname>Boost.Regex</libraryname> library is required.
+        </para>
+    </section>
+
+    <section>
+        <title>Tests</title>
+        <para>
+ A full set of test cases for the library is located in the libs/algorithm/string/test directory. + The test cases can be executed using the boost build system. For the tests of regular + expression variants of algorithms, the <libraryname>Boost.Regex</libraryname> library is required.
+        </para>
+    </section>
+
+    <section>
+        <title>Portability</title>
+        <para>
+ The library has been successfully compiled and tested with the following compilers:
+
+            <itemizedlist>
+                <listitem>Microsoft Visual C++ 7.0</listitem>
+                <listitem>Microsoft Visual C++ 7.1</listitem>
+                <listitem>GCC 3.2</listitem>
+                <listitem>GCC 3.3.1</listitem>
+            </itemizedlist>
+
+ See <ulink url="http://boost.sourceforge.net/regression-logs/";>Boost regression tables</ulink>
+            for additional info for a particular compiler.
+        </para>
+        <para>
+ There are known limitation on platforms not supporting partial template specialization. + Library depends on correctly implemented <code>std::iterator_traits</code> class. + If a standard library provided with compiler is broken, the String Algorithm Library + cannot function properly. Usually it implies that primitive pointer iterators are not
+            working with the library functions.
+        </para>
+    </section>
+</section>
=======================================
--- /dev/null
+++ /trunk/libs/algorithm/string/doc/intro.xml  Mon Dec 28 23:05:14 2009
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd";>
+
+
+<!-- Copyright (c) 2002-2006 Pavol Droba.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<section id="string_algo.intro" last-revision="$Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $">
+    <title>Introduction</title>
+
+    <para>
+        The String Algorithm Library provides a generic implementation of
+ string-related algorithms which are missing in STL. It is an extension + to the algorithms library of STL and it includes trimming, case conversion, + predicates and find/replace functions. All of them come in different variants
+        so it is easier to choose the best fit for a particular need.
+    </para>
+    <para>
+ The implementation is not restricted to work with a particular container
+        (like <code>std::basic_string</code>), rather it is as generic as
+ possible. This generalization is not compromising the performance since + algorithms are using container specific features when it means a performance
+        gain.
+    </para>
+    <para>
+        <emphasis role="bold">
+ Important note: In this documentation we use term <emphasis>string</emphasis> to + designate a sequence of <emphasis>characters</emphasis> stored in an arbitrary container. + A <emphasis>string</emphasis> is not restricted to <code>std::basic_string</code> and + <emphasis>character</emphasis> does not have to be <code>char</code> or <code>wchar_t</code>,
+            although these are most common candidates.
+        </emphasis>
+ Consult the <link linkend="string_algo.design">design chapter</link> to see precise specification of
+        supported string types.
+    </para>
+    <para>
+ The library interface functions and classes are defined in namespace <code>boost::algorithm</code>, and + they are lifted into namespace <code>boost</code> via using declaration.
+    </para>
+    <para>
+ The documentation is divided into several sections. For a quick start read the
+        <link linkend="string_algo.usage">Usage</link> section followed by
+        <link linkend="string_algo.quickref">Quick Reference</link>.
+        <link linkend="string_algo.design">The Design Topics</link>,
+ <link linkend="string_algo.concept">Concepts</link> and <link linkend="string_algo.rationale">Rationale</link> + provide some explanation about the library design and structure an explain how it should be used. + See the <link linkend="string_algo.reference">Reference</link> for the complete list of provided utilities + and algorithms. Functions and classes in the reference are organized by the headers in which they are defined. + The reference contains links to the detailed description for every entity in the library.
+    </para>
+</section>
=======================================
--- /dev/null
+++ /trunk/libs/algorithm/string/doc/quickref.xml       Mon Dec 28 23:05:14 2009
@@ -0,0 +1,744 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd";>
+
+<!-- Copyright (c) 2002-2006 Pavol Droba.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<section id="string_algo.quickref" last-revision="$Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $">
+    <title>Quick Reference</title>
+
+    <using-namespace name="boost"/>
+    <using-namespace name="boost::algorithm"/>
+
+    <section>
+        <title>Algorithms</title>
+
+        <table>
+            <title>Case Conversion</title>
+            <tgroup cols="3" align="left">
+                <thead>
+                    <row>
+                        <entry>Algorithm name</entry>
+                        <entry>Description</entry>
+                        <entry>Functions</entry>
+                    </row>
+                </thead>
+                <tbody>
+                    <row>
+                        <entry><code>to_upper</code></entry>
+                        <entry>Convert a string to upper case</entry>
+                        <entry>
+                            <functionname>to_upper_copy()</functionname>
+                            <sbr/>
+                            <functionname>to_upper()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry><code>to_lower</code></entry>
+                        <entry>Convert a string to lower case</entry>
+                        <entry>
+                            <functionname>to_lower_copy()</functionname>
+                            <sbr/>
+                            <functionname>to_lower()</functionname>
+                        </entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+        <table>
+            <title>Trimming</title>
+            <tgroup cols="3" align="left">
+                <thead>
+                    <row>
+                        <entry>Algorithm name</entry>
+                        <entry>Description</entry>
+                        <entry>Functions</entry>
+                    </row>
+                </thead>
+                <tbody>
+                    <row>
+                        <entry><code>trim_left</code></entry>
+                        <entry>Remove leading spaces from a string</entry>
+                        <entry>
+ <functionname>trim_left_copy_if()</functionname>
+                            <sbr/>
+                            <functionname>trim_left_if()</functionname>
+                            <sbr/>
+                            <functionname>trim_left_copy()</functionname>
+                            <sbr/>
+                            <functionname>trim_left()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry><code>trim_right</code></entry>
+                        <entry>Remove trailing spaces from a string</entry>
+                        <entry>
+ <functionname>trim_right_copy_if()</functionname>
+                            <sbr/>
+                            <functionname>trim_right_if()</functionname>
+                            <sbr/>
+                            <functionname>trim_right_copy()</functionname>
+                            <sbr/>
+                            <functionname>trim_right()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry><code>trim</code></entry>
+ <entry>Remove leading and trailing spaces from a string</entry>
+                        <entry>
+                            <functionname>trim_copy_if()</functionname>
+                            <sbr/>
+                            <functionname>trim_if()</functionname>
+                            <sbr/>
+                            <functionname>trim_copy()</functionname>
+                            <sbr/>
+                            <functionname>trim()</functionname>
+                        </entry>
+                    </row>
+
+                </tbody>
+            </tgroup>
+        </table>
+        <table>
+            <title>Predicates</title>
+            <tgroup cols="3" align="left">
+                <thead>
+                    <row>
+                        <entry>Algorithm name</entry>
+                        <entry>Description</entry>
+                        <entry>Functions</entry>
+                    </row>
+                </thead>
+                <tbody>
+                    <row>
+                        <entry><code>starts_with</code></entry>
+ <entry>Check if a string is a prefix of the other one</entry>
+                        <entry>
+                            <functionname>starts_with()</functionname>
+                            <sbr/>
+                            <functionname>istarts_with()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry><code>ends_with</code></entry>
+ <entry>Check if a string is a suffix of the other one</entry>
+                        <entry>
+                            <functionname>ends_with()</functionname>
+                            <sbr/>
+                            <functionname>iends_with()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry><code>contains</code></entry>
+ <entry>Check if a string is contained of the other one</entry>
+                        <entry>
+                            <functionname>contains()</functionname>
+                            <sbr/>
+                            <functionname>icontains()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry><code>equals</code></entry>
+                        <entry>Check if two strings are equal</entry>
+                        <entry>
+                            <functionname>equals()</functionname>
+                            <sbr/>
+                            <functionname>iequals()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry><code>lexicographical_compare</code></entry>
+ <entry>Check if a string is lexicographically less then another one</entry>
+                        <entry>
+ <functionname>lexicographical_compare()</functionname>
+                            <sbr/>
+ <functionname>ilexicographical_compare()</functionname>
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><code>all</code></entry>
+ <entry>Check if all elements of a string satisfy the given predicate</entry>
+                        <entry>
+                            <functionname>all()</functionname>
+                        </entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+        <table>
+            <title>Find algorithms</title>
+            <tgroup cols="3" align="left">
+                <thead>
+                    <row>
+                        <entry>Algorithm name</entry>
+                        <entry>Description</entry>
+                        <entry>Functions</entry>
+                    </row>
+                </thead>
+                <tbody>
+                    <row>
+                        <entry>find_first</entry>
+ <entry>Find the first occurrence of a string in the input</entry>
+                        <entry>
+                            <functionname>find_first()</functionname>
+                            <sbr/>
+                            <functionname>ifind_first()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>find_last</entry>
+ <entry>Find the last occurrence of a string in the input</entry>
+                        <entry>
+                            <functionname>find_last()</functionname>
+                            <sbr/>
+                            <functionname>ifind_last()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>find_nth</entry>
+ <entry>Find the nth (zero-indexed) occurrence of a string in the input</entry>
+                        <entry>
+                            <functionname>find_nth()</functionname>
+                            <sbr/>
+                            <functionname>ifind_nth()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>find_head</entry>
+                        <entry>Retrieve the head of a string</entry>
+                        <entry>
+                            <functionname>find_head()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>find_tail</entry>
+                        <entry>Retrieve the tail of a string</entry>
+                        <entry>
+                            <functionname>find_tail()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>find_token</entry>
+ <entry>Find first matching token in the string</entry>
+                        <entry>
+                            <functionname>find_token()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>find_regex</entry>
+ <entry>Use the regular expression to search the string</entry>
+                        <entry>
+                            <functionname>find_regex()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>find</entry>
+                        <entry>Generic find algorithm</entry>
+                        <entry>
+                            <functionname>find()</functionname>
+                        </entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+        <table>
+            <title>Erase/Replace</title>
+            <tgroup cols="3" align="left">
+                <thead>
+                    <row>
+                        <entry>Algorithm name</entry>
+                        <entry>Description</entry>
+                        <entry>Functions</entry>
+                    </row>
+                </thead>
+                <tbody>
+                    <row>
+                        <entry>replace/erase_first</entry>
+ <entry>Replace/Erase the first occurrence of a string in the input</entry>
+                        <entry>
+                            <functionname>replace_first()</functionname>
+                            <sbr/>
+ <functionname>replace_first_copy()</functionname>
+                            <sbr/>
+                            <functionname>ireplace_first()</functionname>
+                            <sbr/>
+ <functionname>ireplace_first_copy()</functionname>
+                            <sbr/>
+                            <functionname>erase_first()</functionname>
+                            <sbr/>
+                            <functionname>erase_first_copy()</functionname>
+                            <sbr/>
+                            <functionname>ierase_first()</functionname>
+                            <sbr/>
+ <functionname>ierase_first_copy()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>replace/erase_last</entry>
+ <entry>Replace/Erase the last occurrence of a string in the input</entry>
+                        <entry>
+                            <functionname>replace_last()</functionname>
+                            <sbr/>
+ <functionname>replace_last_copy()</functionname>
+                            <sbr/>
+                            <functionname>ireplace_last()</functionname>
+                            <sbr/>
+ <functionname>ireplace_last_copy()</functionname>
+                            <sbr/>
+                            <functionname>erase_last()</functionname>
+                            <sbr/>
+                            <functionname>erase_last_copy()</functionname>
+                            <sbr/>
+                            <functionname>ierase_last()</functionname>
+                            <sbr/>
+                            <functionname>ierase_last_copy()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>replace/erase_nth</entry>
+ <entry>Replace/Erase the nth (zero-indexed) occurrence of a string in the input</entry>
+                        <entry>
+                            <functionname>replace_nth()</functionname>
+                            <sbr/>
+                            <functionname>replace_nth_copy()</functionname>
+                            <sbr/>
+                            <functionname>ireplace_nth()</functionname>
+                            <sbr/>
+ <functionname>ireplace_nth_copy()</functionname>
+                            <sbr/>
+                            <functionname>erase_nth()</functionname>
+                            <sbr/>
+                            <functionname>erase_nth_copy()</functionname>
+                            <sbr/>
+                            <functionname>ierase_nth()</functionname>
+                            <sbr/>
+                            <functionname>ierase_nth_copy()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>replace/erase_all</entry>
+ <entry>Replace/Erase the all occurrences of a string in the input</entry>
+                        <entry>
+                            <functionname>replace_all()</functionname>
+                            <sbr/>
+                            <functionname>replace_all_copy()</functionname>
+                            <sbr/>
+                            <functionname>ireplace_all()</functionname>
+                            <sbr/>
+ <functionname>ireplace_all_copy()</functionname>
+                            <sbr/>
+                            <functionname>erase_all()</functionname>
+                            <sbr/>
+                            <functionname>erase_all_copy()</functionname>
+                            <sbr/>
+                            <functionname>ierase_all()</functionname>
+                            <sbr/>
+                            <functionname>ierase_all_copy()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>replace/erase_head</entry>
+                        <entry>Replace/Erase the head of the input</entry>
+                        <entry>
+                            <functionname>replace_head()</functionname>
+                            <sbr/>
+ <functionname>replace_head_copy()</functionname>
+                            <sbr/>
+                            <functionname>erase_head()</functionname>
+                            <sbr/>
+                            <functionname>erase_head_copy()</functionname>
+                            <sbr/>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>replace/erase_tail</entry>
+                        <entry>Replace/Erase the tail of the input</entry>
+                        <entry>
+                            <functionname>replace_tail()</functionname>
+                            <sbr/>
+ <functionname>replace_tail_copy()</functionname>
+                            <sbr/>
+                            <functionname>erase_tail()</functionname>
+                            <sbr/>
+                            <functionname>erase_tail_copy()</functionname>
+                            <sbr/>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>replace/erase_regex</entry>
+ <entry>Replace/Erase a substring matching the given regular expression</entry>
+                        <entry>
+                            <functionname>replace_regex()</functionname>
+                            <sbr/>
+ <functionname>replace_regex_copy()</functionname>
+                            <sbr/>
+                            <functionname>erase_regex()</functionname>
+                            <sbr/>
+                            <functionname>erase_regex_copy()</functionname>
+                            <sbr/>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>replace/erase_regex_all</entry>
+ <entry>Replace/Erase all substrings matching the given regular expression</entry>
+                        <entry>
+ <functionname>replace_all_regex()</functionname>
+                            <sbr/>
+ <functionname>replace_all_regex_copy()</functionname>
+                            <sbr/>
+                            <functionname>erase_all_regex()</functionname>
+                            <sbr/>
+ <functionname>erase_all_regex_copy()</functionname>
+                            <sbr/>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>find_format</entry>
+                        <entry>Generic replace algorithm</entry>
+                        <entry>
+                            <functionname>find_format()</functionname>
+                            <sbr/>
+                            <functionname>find_format_copy()</functionname>
+                            <sbr/>
+                            <functionname>find_format_all()</functionname>
+                            <sbr/>
+ <functionname>find_format_all_copy()()</functionname>
+                        </entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+        <table>
+            <title>Split</title>
+            <tgroup cols="3" align="left">
+                <thead>
+                    <row>
+                        <entry>Algorithm name</entry>
+                        <entry>Description</entry>
+                        <entry>Functions</entry>
+                    </row>
+                </thead>
+                <tbody>
+                    <row>
+                        <entry>find_all</entry>
+ <entry>Find/Extract all matching substrings in the input</entry>
+                        <entry>
+                            <functionname>find_all()</functionname>
+                            <sbr/>
+                            <functionname>ifind_all()</functionname>
+                            <sbr/>
+                            <functionname>find_all_regex()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>split</entry>
+                        <entry>Split input into parts</entry>
+                        <entry>
+                            <functionname>split()</functionname>
+                            <sbr/>
+                            <functionname>split_regex()</functionname>
+                        </entry>
+                                       </row>
+                                       <row>
+                                               <entry>iter_find</entry>
+ <entry>Iteratively apply the finder to the input to find all matching substrings</entry>
+                                               <entry>
+                                                       
<functionname>iter_find()</functionname>
+                                               </entry>
+                                       </row>
+                                       <row>
+                                               <entry>iter_split</entry>
+ <entry>Use the finder to find matching substrings in the input and use them as separators to split the input into parts</entry>
+                                               <entry>
+                                                       
<functionname>iter_split()</functionname>
+                                               </entry>
+                                       </row>
+                </tbody>
+            </tgroup>
+        </table>
+        <table>
+            <title>Join</title>
+            <tgroup cols="3" align="left">
+                <thead>
+                    <row>
+                        <entry>Algorithm name</entry>
+                        <entry>Description</entry>
+                        <entry>Functions</entry>
+                    </row>
+                </thead>
+                <tbody>
+                    <row>
+                        <entry>join</entry>
+ <entry>Join all elements in a container into a single string</entry>
+                        <entry>
+                            <functionname>join</functionname>
+                        </entry>
+                    </row>
+                        <row>
+                        <entry>join_if</entry>
+ <entry>Join all elements in a container that satisfies the condition into a single string</entry>
+                        <entry>
+                            <functionname>join_if()</functionname>
+                        </entry>
+                   </row>
+                </tbody>
+            </tgroup>
+        </table>
+    </section>
+    <section>
+        <title>Finders and Formatters</title>
+
+        <table>
+            <title>Finders</title>
+            <tgroup cols="3" align="left">
+                <thead>
+                    <row>
+                        <entry>Finder</entry>
+                        <entry>Description</entry>
+                        <entry>Generators</entry>
+                    </row>
+                </thead>
+                <tbody>
+                    <row>
+                        <entry>first_finder</entry>
+ <entry>Search for the first match of the string in an input</entry>
+                        <entry>
+                            <functionname>first_finder()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>last_finder</entry>
+ <entry>Search for the last match of the string in an input</entry>
+                        <entry>
+                            <functionname>last_finder()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>nth_finder</entry>
+ <entry>Search for the nth (zero-indexed) match of the string in an input</entry>
+                        <entry>
+                            <functionname>nth_finder()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>head_finder</entry>
+                        <entry>Retrieve the head of an input</entry>
+                        <entry>
+                            <functionname>head_finder()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>tail_finder</entry>
+                        <entry>Retrieve the tail of an input</entry>
+                        <entry>
+                            <functionname>tail_finder()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>token_finder</entry>
+ <entry>Search for a matching token in an input</entry>
+                        <entry>
+                            <functionname>token_finder()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>range_finder</entry>
+ <entry>Do no search, always returns the given range</entry>
+                        <entry>
+                            <functionname>range_finder()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>regex_finder</entry>
+ <entry>Search for a substring matching the given regex</entry>
+                        <entry>
+                            <functionname>regex_finder()</functionname>
+                        </entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+
+        <table>
+            <title>Formatters</title>
+            <tgroup cols="3" align="left">
+                <thead>
+                    <row>
+                        <entry>Formatter</entry>
+                        <entry>Description</entry>
+                        <entry>Generators</entry>
+                    </row>
+                </thead>
+                <tbody>
+                    <row>
+                        <entry>const_formatter</entry>
+ <entry>Constant formatter. Always return the specified string</entry>
+                        <entry>
+                            <functionname>const_formatter()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>identity_formatter</entry>
+ <entry>Identity formatter. Return unmodified input input</entry>
+                        <entry>
+ <functionname>identity_formatter()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>empty_formatter</entry>
+ <entry>Null formatter. Always return an empty string</entry>
+                        <entry>
+                            <functionname>empty_formatter()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>regex_formatter</entry>
+ <entry>Regex formatter. Format regex match using the specification in the format string</entry>
+                        <entry>
+                            <functionname>regex_formatter()</functionname>
+                        </entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+    </section>
+    <section>
+        <title>Iterators</title>
+
+        <table>
+            <title>Find Iterators</title>
+            <tgroup cols="3" align="left">
+                <thead>
+                    <row>
+                        <entry>Iterator name</entry>
+                        <entry>Description</entry>
+                        <entry>Iterator class</entry>
+                    </row>
+                </thead>
+                <tbody>
+                    <row>
+                        <entry>find_iterator</entry>
+ <entry>Iterates through matching substrings in the input</entry>
+                        <entry>
+                            <classname>find_iterator</classname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>split_iterator</entry>
+ <entry>Iterates through gaps between matching substrings in the input</entry>
+                        <entry>
+                            <classname>split_iterator</classname>
+                        </entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+    </section>
+
+    <section>
+        <title>Classification</title>
+
+        <table>
+            <title>Predicates</title>
+            <tgroup cols="3" align="left">
+                <thead>
+                    <row>
+                        <entry>Predicate name</entry>
+                        <entry>Description</entry>
+                        <entry>Generator</entry>
+                    </row>
+                </thead>
+                <tbody>
+                    <row>
+                        <entry>is_classified</entry>
+ <entry>Generic <code>ctype</code> mask based classification</entry>
+                        <entry>
+                            <functionname>is_classified()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>is_space</entry>
+                        <entry>Recognize spaces</entry>
+                        <entry>
+                            <functionname>is_space()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>is_alnum</entry>
+                        <entry>Recognize alphanumeric characters</entry>
+                        <entry>
+                            <functionname>is_alnum()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>is_alpha</entry>
+                        <entry>Recognize letters</entry>
+                        <entry>
+                            <functionname>is_alpha()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>is_cntrl</entry>
+                        <entry>Recognize control characters</entry>
+                        <entry>
+                            <functionname>is_cntrl()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>is_digit</entry>
+                        <entry>Recognize decimal digits</entry>
+                        <entry>
+                            <functionname>is_digit()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>is_graph</entry>
+                        <entry>Recognize graphical characters</entry>
+                        <entry>
+                            <functionname>is_graph()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>is_lower</entry>
+                        <entry>Recognize lower case characters</entry>
+                        <entry>
+                            <functionname>is_lower()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>is_print</entry>
+                        <entry>Recognize printable characters</entry>
+                        <entry>
+                            <functionname>is_print()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>is_punct</entry>
+                        <entry>Recognize punctuation characters</entry>
+                        <entry>
+                            <functionname>is_punct()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>is_upper</entry>
+                        <entry>Recognize uppercase characters</entry>
+                        <entry>
+                            <functionname>is_upper()</functionname>
+                        </entry>
+                    </row>
+                    <row>
+                        <entry>is_xdigit</entry>
+                        <entry>Recognize hexadecimal digits</entry>
+                        <entry>
+                            <functionname>is_xdigit()</functionname>
+                        </entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+    </section>
+</section>
=======================================
--- /dev/null
+++ /trunk/libs/algorithm/string/doc/rationale.xml      Mon Dec 28 23:05:14 2009
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd";>
+
+<!-- Copyright (c) 2002-2006 Pavol Droba.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<section id="string_algo.rationale" last-revision="$Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $">
+    <title>Rationale</title>
+
+    <using-namespace name="boost"/>
+    <using-namespace name="boost::algorithm"/>
+
+   <section it="string_algo.locale">
+        <title>Locales</title>
+
+        <para>
+ Locales have a very close relation to string processing. They contain information about + the character sets and are used, for example, to change the case of characters and
+            to classify the characters.
+        </para>
+        <para>
+ C++ allows to work with multiple different instances of locales at once. If an algorithm + manipulates some data in a way that requires the usage of locales, there must be a way + to specify them. However, one instance of locales is sufficient for most of the applications, + and for a user it could be very tedious to specify which locales to use at every place
+            where it is needed.
+        </para>
+        <para>
+ Fortunately, the C++ standard allows to specify the <emphasis>global</emphasis> locales (using static member + function <code>std:locale::global()</code>). When instantiating an + <code>std::locale</code> class without explicit information, the instance will + be initialized with the <emphasis>global</emphasis> locale. This implies, that if an algorithm needs a locale, + it should have an <code>std::locale</code> parameter defaulting to <code>std::locale()</code>. + If a user needs to specify locales explicitly, she can do so. Otherwise the <emphasis>global</emphasis>
+            locales are used.
+        </para>
+    </section>
+    <section id="string_algo.regex">
+        <title>Regular Expressions</title>
+
+        <para>
+ Regular expressions are an essential part of text processing. For this reason, the library + also provides regex variants of some algorithms. The library does not attempt to replace + <libraryname>Boost.Regex</libraryname>; it merely wraps its functionality in a new interface. + As a part of this library, regex algorithms integrate smoothly with other components, which
+            brings additional value.
+        </para>
+    </section>
+</section>
=======================================
--- /dev/null
+++ /trunk/libs/algorithm/string/doc/release_notes.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd";>
+
+<!-- Copyright (c) 2002-2006 Pavol Droba.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<section id="string_algo.release_notes" last-revision="$Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $">
+
+    <using-namespace name="boost"/>
+    <using-namespace name="boost::algorithm"/>
+
+    <title>Release Notes</title>
+
+    <itemizedlist>
+        <listitem>
+            <para><emphasis role="bold">1.32</emphasis></para>
+            <para>Initial release in Boost</para>
+        </listitem>
+        <listitem>
+            <para><emphasis role="bold">1.33</emphasis></para>
+ <para>Internal version of collection traits removed, library adapted to Boost.Range</para>
+        </listitem>
+        <listitem>
+            <para><emphasis role="bold">1.34</emphasis></para>
+            <itemizedlist>
+                <listitem>
+                    <functionname>lexicographical_compare()</functionname>
+                </listitem>
+                <listitem>
+ <functionname>join()</functionname> and <functionname>join_if()</functionname>
+                </listitem>
+                <listitem>
+ New comparison predicates <code>is_less</code>, <code>is_not_greater</code>
+                </listitem>
+                <listitem>
+ Negative indexes support (like Perl) in various algorihtms
+                     (<code>*_head/tail</code>, <code>*_nth</code>).
+                </listitem>
+            </itemizedlist>
+        </listitem>
+    </itemizedlist>
+</section>
=======================================
--- /dev/null
+++ /trunk/libs/algorithm/string/doc/string_algo.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd";>
+
+<!-- Copyright (c) 2002-2006 Pavol Droba.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<library name="String Algorithms" dirname="algorithm/string" xmlns:xi="http://www.w3.org/2001/XInclude"; + id="string_algo" last-revision="$Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $">
+    <libraryinfo>
+        <author>
+            <firstname>Pavol</firstname>
+            <surname>Droba</surname>
+        </author>
+
+        <copyright>
+            <year>2002</year>
+            <year>2003</year>
+            <year>2004</year>
+            <holder>Pavol Droba</holder>
+        </copyright>
+
+        <legalnotice>
+ <para>Use, modification and distribution is subject to 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>
+        </legalnotice>
+
+        <librarypurpose>
+            A set of generic string-related algorithms and utilities
+        </librarypurpose>
+        <librarycategory name="category:algoritms"/>
+        <librarycategory name="category:string-text"/>
+    </libraryinfo>
+
+    <title>Boost String Algorithms Library</title>
+    <xi:include href="intro.xml"/>
+    <xi:include href="release_notes.xml"/>
+    <xi:include href="usage.xml"/>
+    <xi:include href="quickref.xml"/>
+    <xi:include href="design.xml"/>
+    <xi:include href="concept.xml"/>
+    <xi:include href="autodoc.xml"/>
+    <xi:include href="rationale.xml"/>
+    <xi:include href="environment.xml"/>
+    <xi:include href="credits.xml"/>
+</library>
+
=======================================
--- /dev/null
+++ /trunk/libs/algorithm/string/doc/usage.xml  Mon Dec 28 23:05:14 2009
@@ -0,0 +1,361 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd";>
+
+
+<!-- Copyright (c) 2002-2006 Pavol Droba.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+
+<section id="string_algo.usage" last-revision="$Date: 2009-06-14 18:56:08 -0400 (Sun, 14 Jun 2009) $">
+    <title>Usage</title>
+
+    <using-namespace name="boost"/>
+    <using-namespace name="boost::algorithm"/>
+
+
+    <section>
+        <title>First Example</title>
+
+        <para>
+ Using the algorithms is straightforward. Let us have a look at the first example:
+        </para>
+        <programlisting>
+    #include &lt;boost/algorithm/string.hpp&gt;
+    using namespace std;
+    using namespace boost;
+
+    // ...
+
+    string str1(" hello world! ");
+    to_upper(str1);  // str1 == " HELLO WORLD! "
+    trim(str1);      // str1 == "HELLO WORLD!"
+
+    string str2=
+       to_lower_copy(
+          ireplace_first_copy(
+             str1,"hello","goodbye")); // str2 == "goodbye world!"
+        </programlisting>
+        <para>
+ This example converts str1 to upper case and trims spaces from the start and the end + of the string. str2 is then created as a copy of str1 with "hello" replaced with "goodbye". + This example demonstrates several important concepts used in the library:
+        </para>
+        <itemizedlist>
+            <listitem>
+ <para><emphasis role="bold">Container parameters:</emphasis> + Unlike in the STL algorithms, parameters are not specified only in the form + of iterators. The STL convention allows for great flexibility, + but it has several limitations. It is not possible to <emphasis>stack</emphasis> algorithms together, + because a container is passed in two parameters. Therefore it is not possible to use + a return value from another algorithm. It is considerably easier to write + <code>to_lower(str1)</code>, than <code>to_lower(str1.begin(), str1.end())</code>.
+                </para>
+                <para>
+ The magic of <ulink url="../../libs/range/index.html">Boost.Range</ulink> + provides a uniform way of handling different string types.
+                    If there is a need to pass a pair of iterators,
+ <ulink url="../../libs/range/doc/utility_class.html"><code>boost::iterator_range</code></ulink> + can be used to package iterators into a structure with a compatible interface.
+                </para>
+            </listitem>
+            <listitem>
+                <para><emphasis role="bold">Copy vs. Mutable:</emphasis>
+ Many algorithms in the library are performing a transformation of the input. + The transformation can be done in-place, mutating the input sequence, or a copy + of the transformed input can be created, leaving the input intact. None of + these possibilities is superior to the other one and both have different + advantages and disadvantages. For this reason, both are provided with the library.
+                </para>
+            </listitem>
+            <listitem>
+                <para><emphasis role="bold">Algorithm stacking:</emphasis>
+ Copy versions return a transformed input as a result, thus allow a simple chaining of + transformations within one expression (i.e. one can write <code>trim_copy(to_upper_copy(s))</code>). + Mutable versions have <code>void</code> return, to avoid misuse.
+                </para>
+            </listitem>
+            <listitem>
+                <para><emphasis role="bold">Naming:</emphasis>
+ Naming follows the conventions from the Standard C++ Library. If there is a + copy and a mutable version of the same algorithm, the mutable version has no suffix + and the copy version has the suffix <emphasis>_copy</emphasis>.
+                    Some algorithms have the prefix <emphasis>i</emphasis>
+                    (e.g. <functionname>ifind_first()</functionname>).
+ This prefix identifies that the algorithm works in a case-insensitive manner.
+                </para>
+            </listitem>
+        </itemizedlist>
+        <para>
+ To use the library, include the <headername>boost/algorithm/string.hpp</headername> header.
+            If the regex related functions are needed, include the
+ <headername>boost/algorithm/string_regex.hpp</headername> header.
+        </para>
+    </section>
+    <section>
+        <title>Case conversion</title>
+
+        <para>
+ STL has a nice way of converting character case. Unfortunately, it works only
+            for a single character and we want to convert a string,
+        </para>
+        <programlisting>
+    string str1("HeLlO WoRld!");
+    to_upper(str1); // str1=="HELLO WORLD!"
+        </programlisting>
+        <para>
+ <functionname>to_upper()</functionname> and <functionname>to_lower()</functionname> convert the case of
+            characters in a string using a specified locale.
+        </para>
+        <para>
+ For more information see the reference for <headername>boost/algorithm/string/case_conv.hpp</headername>.
+        </para>
+    </section>
+    <section>
+        <title>Predicates and Classification</title>
+        <para>
+ A part of the library deals with string related predicates. Consider this example:
+        </para>
+        <programlisting>
+    bool is_executable( string&amp; filename )
+    {
+        return
+            iends_with(filename, ".exe") ||
+            iends_with(filename, ".com");
+    }
+
+    // ...
+    string str1("command.com");
+    cout
+        &lt;&lt; str1
+        &lt;&lt; (is_executable("command.com")? "is": "is not")
+        &lt;&lt; "an executable"
+        &lt;&lt; endl; // prints "command.com is an executable"
+
+    //..
+    char text1[]="hello world!";
+    cout
+        &lt;&lt; text1
+        &lt;&lt; (all( text1, is_lower() )? "is": "is not")
+        &lt;&lt; " written in the lower case"
+ &lt;&lt; endl; // prints "hello world! is written in the lower case"
+        </programlisting>
+        <para>
+ The predicates determine whether if a substring is contained in the input string + under various conditions. The conditions are: a string starts with the substring,
+            ends with the substring,
+ simply contains the substring or if both strings are equal. See the reference for + <headername>boost/algorithm/string/predicate.hpp</headername> for more details.
+        </para>
+        <para>
+ In addition the algorithm <functionname>all()</functionname> checks + all elements of a container to satisfy a condition specified by a predicate. + This predicate can be any unary predicate, but the library provides a bunch of
+            useful string-related predicates and combinators ready for use.
+ These are located in the <headername>boost/algorithm/string/classification.hpp</headername> header. + Classification predicates can be combined using logical combinators to form + a more complex expressions. For example: <code>is_from_range('a','z') || is_digit()</code>
+        </para>
+    </section>
+    <section>
+        <title>Trimming</title>
+
+        <para>
+ When parsing the input from a user, strings usually have unwanted leading or trailing
+            characters. To get rid of them, we need trim functions:
+        </para>
+        <programlisting>
+    string str1="     hello world!     ";
+    string str2=trim_left_copy(str1);   // str2 == "hello world!     "
+    string str3=trim_right_copy(str2);  // str3 == "     hello world!"
+    trim(str1);                         // str1 == "hello world!"
+
+    string phone="00423333444";
+    // remove leading 0 from the phone number
+    trim_left_if(phone,is_any_of("0")); // phone == "423333444"
+        </programlisting>
+        <para>
+ It is possible to trim the spaces on the right, on the left or on both sides of a string. + And for those cases when there is a need to remove something else than blank space, there + are <emphasis>_if</emphasis> variants. Using these, a user can specify a functor which will + select the <emphasis>space</emphasis> to be removed. It is possible to use classification + predicates like <functionname>is_digit()</functionname> mentioned in the previous paragraph. + See the reference for the <headername>boost/algorithm/string/trim.hpp</headername>.
+        </para>
+    </section>
+    <section>
+        <title>Find algorithms</title>
+
+        <para>
+ The library contains a set of find algorithms. Here is an example:
+        </para>
+        <programlisting>
+    char text[]="hello dolly!";
+    iterator_range&lt;char*&gt; result=find_last(text,"ll");
+
+ transform( result.begin(), result.end(), result.begin(), bind2nd(plus&lt;char&gt;(), 1) );
+    // text = "hello dommy!"
+
+    to_upper(result); // text == "hello doMMy!"
+
+    // iterator_range is convertible to bool
+    if(find_first(text, "dolly"))
+    {
+        cout &lt;&lt; "Dolly is there" &lt;&lt; endl;
+    }
+        </programlisting>
+        <para>
+ We have used <functionname>find_last()</functionname> to search the <code>text</code> for "ll". + The result is given in the <ulink url="../../libs/range/doc/utility_class.html"><code>boost::iterator_range</code></ulink>.
+            This range delimits the
+ part of the input which satisfies the find criteria. In our example it is the last occurrence of "ll".
+
+ As we can see, input of the <functionname>find_last()</functionname> algorithm can be also
+            char[] because this type is supported by
+            <ulink url="../../libs/range/index.html">Boost.Range</ulink>.
+
+            The following lines transform the result. Notice that
+ <ulink url="../../libs/range/doc/utility_class.html"><code>boost::iterator_range</code></ulink> has familiar + <code>begin()</code> and <code>end()</code> methods, so it can be used like any other STL container. + Also it is convertible to bool therefore it is easy to use find algorithms for a simple containment checking.
+        </para>
+        <para>
+ Find algorithms are located in <headername>boost/algorithm/string/find.hpp</headername>.
+        </para>
+    </section>
+    <section>
+        <title>Replace Algorithms</title>
+        <para>
+ Find algorithms can be used for searching for a specific part of string. Replace goes one step + further. After a matching part is found, it is substituted with something else. The substitution is computed
+            from the original, using some transformation.
+        </para>
+        <programlisting>
+    string str1="Hello  Dolly,   Hello World!"
+ replace_first(str1, "Dolly", "Jane"); // str1 == "Hello Jane, Hello World!" + replace_last(str1, "Hello", "Goodbye"); // str1 == "Hello Jane, Goodbye World!" + erase_all(str1, " "); // str1 == "HelloJane,GoodbyeWorld!" + erase_head(str1, 6); // str1 == "Jane,GoodbyeWorld!"
+        </programlisting>
+        <para>
+            For the complete list of replace and erase functions see the
+            <link linkend="string_algo.reference">reference</link>.
+ There is a lot of predefined function for common usage, however, the library allows you to + define a custom <code>replace()</code> that suits a specific need. There is a generic <functionname>find_format()</functionname>
+            function which takes two parameters.
+ The first one is a <link linkend="string_algo.finder_concept">Finder</link> object, the second one is + a <link linkend="string_algo.formatter_concept">Formatter</link> object. + The Finder object is a functor which performs the searching for the replacement part. The Formatter object + takes the result of the Finder (usually a reference to the found substring) and creates a + substitute for it. Replace algorithm puts these two together and makes the desired substitution.
+        </para>
+        <para>
+ Check <headername>boost/algorithm/string/replace.hpp</headername>, <headername>boost/algorithm/string/erase.hpp</headername> and + <headername>boost/algorithm/string/find_format.hpp</headername> for reference.
+        </para>
+    </section>
+    <section>
+        <title>Find Iterator</title>
+
+        <para>
+ An extension to find algorithms it the Find Iterator. Instead of searching for just a one part of a string, + the find iterator allows us to iterate over the substrings matching the specified criteria. + This facility is using the <link linkend="string_algo.finder_concept">Finder</link> to incrementally
+            search the string.
+ Dereferencing a find iterator yields an <ulink url="../../libs/range/doc/utility_class.html"><code>boost::iterator_range</code></ulink>
+            object, that delimits the current match.
+        </para>
+        <para>
+ There are two iterators provided <classname>find_iterator</classname> and + <classname>split_iterator</classname>. The former iterates over substrings that are found using the specified + Finder. The latter iterates over the gaps between these substrings.
+        </para>
+        <programlisting>
+    string str1("abc-*-ABC-*-aBc");
+    // Find all 'abc' substrings (ignoring the case)
+    // Create a find_iterator
+    typedef find_iterator&lt;string::iterator&gt; string_find_iterator;
+    for(string_find_iterator It=
+            make_find_iterator(str1, first_finder("abc", is_iequal()));
+        It!=string_find_iterator();
+        ++It)
+    {
+        cout &lt;&lt; copy_range&lt;std::string&gt;(*It) &lt;&lt; endl;
+    }
+
+    // Output will be:
+    // abc
+    // ABC
+    // aBC
+
+    typedef split_iterator&lt;string::iterator&gt; string_split_iterator;
+    for(string_split_iterator It=
+        make_split_iterator(str1, first_finder("-*-", is_iequal()));
+        It!=string_split_iterator();
+        ++It)
+    {
+        cout &lt;&lt; copy_range&lt;std::string&gt;(*It) &lt;&lt; endl;
+    }
+
+    // Output will be:
+    // abc
+    // ABC
+    // aBC
+        </programlisting>
+        <para>
+ Note that the find iterators have only one template parameter. It is the base iterator type. + The Finder is specified at runtime. This allows us to typedef a find iterator for + common string types and reuse it. Additionally make_*_iterator functions help
+            to construct a find iterator for a particular range.
+        </para>
+        <para>
+ See the reference in <headername>boost/algorithm/string/find_iterator.hpp</headername>.
+        </para>
+    </section>
+    <section>
+        <title>Split</title>
+
+        <para>
+ Split algorithms are an extension to the find iterator for one common usage scenario. + These algorithms use a find iterator and store all matches into the provided + container. This container must be able to hold copies (e.g. <code>std::string</code>) or + references (e.g. <code>iterator_range</code>) of the extracted substrings.
+        </para>
+        <para>
+ Two algorithms are provided. <functionname>find_all()</functionname> finds all copies + of a string in the input. <functionname>split()</functionname> splits the input into parts.
+        </para>
+
+        <programlisting>
+    string str1("hello abc-*-ABC-*-aBc goodbye");
+
+ typedef vector&lt; iterator_range&lt;string::iterator&gt; &gt; find_vector_type;
+
+    find_vector_type FindVec; // #1: Search for separators
+    ifind_all( FindVec, str1, "abc" ); // FindVec == { [abc],[ABC],[aBc] }
+
+    typedef vector&lt; string &gt; split_vector_type;
+
+    split_vector_type SplitVec; // #2: Search for tokens
+ split( SplitVec, str1, is_any_of("-*") ); // SplitVec == { "hello abc","ABC","aBc goodbye" }
+        </programlisting>
+        <para>
+ <code>[hello]</code> designates an <code>iterator_range</code> delimiting this substring.
+        </para>
+        <para>
+ First example show how to construct a container to hold references to all extracted + substrings. Algorithm <functionname>ifind_all()</functionname> puts into FindVec references + to all substrings that are in case-insensitive manner equal to "abc".
+        </para>
+        <para>
+ Second example uses <functionname>split()</functionname> to split string str1 into parts + separated by characters '-' or '*'. These parts are then put into the SplitVec. + It is possible to specify if adjacent separators are concatenated or not.
+        </para>
+        <para>
+ More information can be found in the reference: <headername>boost/algorithm/string/split.hpp</headername>.
+        </para>
+   </section>
+</section>
=======================================
--- /dev/null
+++ /trunk/libs/any/doc/any.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,571 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+  "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd";>
+<library name="Any" dirname="any" xmlns:xi="http://www.w3.org/2001/XInclude"; + id="any" last-revision="$Date: 2009-07-26 16:11:03 -0400 (Sun, 26 Jul 2009) $">
+  <libraryinfo>
+    <author>
+      <firstname>Kevlin</firstname>
+      <surname>Henney</surname>
+    </author>
+
+    <copyright>
+      <year>2001</year>
+      <holder>Kevlin Henney</holder>
+    </copyright>
+
+    <librarypurpose>
+      Safe, generic container for single values of different value types
+    </librarypurpose>
+    <librarycategory name="category:data-structures"/>
+
+    <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>
+    </legalnotice>
+  </libraryinfo>
+
+  <title>Boost.Any</title>
+
+  <section>
+    <title>Introduction 简介</title>
+
+    <para>There are times when a generic (in the sense of
+    <emphasis>general</emphasis> as opposed to
+    <emphasis>template-based programming</emphasis>) type is needed:
+    variables that are truly variable, accommodating values of many
+    other more specific types rather than C++'s normal strict and
+    static types. We can distinguish three basic kinds of generic
+    type:<sbr/>
+    我们经常会需要一个泛型(这个<emphasis>泛型</emphasis>可不是
+    <emphasis>模板编程</emphasis>中的泛型)的类型:变量是真正的变量,
+    可以带有多种不同类型的值,而不是象普通的C++静态类型那样。
+    我们可以分出三种基本的泛型类型:</para>
+
+    <itemizedlist>
+      <listitem>
+        <para>Converting types that can hold one of a number of
+        possible value types, e.g. <code>int</code> and
+        <code>string</code>, and freely convert between them, for
+        instance interpreting <code>5</code> as <code>"5"</code> or
+        vice-versa.  Such types are common in scripting and other
+        interpreted
+        languages.
+        <code><functionname>boost::lexical_cast</functionname></code>
+        supports such conversion functionality.<sbr/>
+        可转换类型,可以是多个可能的值类型之一,如 <code>int</code> 和
+        <code>string</code>, 可以自由地在两者间转换,例如将 <code>5</code>
+        解释为 <code>"5"</code>,反之亦然。在脚本或其它解释语言中,
+ 这种类型称为通用类。 <code><functionname>boost::lexical_cast</functionname></code>
+        支持这种转型功能。</para>
+      </listitem>
+      <listitem>
+        <para>
+        Discriminated types that contain values of different types but
+        do not attempt conversion between them, i.e. <code>5</code> is
+        held strictly as an <code>int</code> and is not implicitly
+        convertible either to <code>"5"</code> or to
+        <code>5.0</code>. Their indifference to interpretation but
+        awareness of type effectively makes them safe, generic
+        containers of single values, with no scope for surprises from
+        ambiguous conversions.<sbr/>
+        可识别类型,包含了不同类型的值,但不会试图在不同类型间进行转换,
+ 即:<code>5</code> 被严格视为一个 <code>int</code> 而不会隐式地转换 + <code>"5"</code> 或 <code>5.0</code>. 它们不关心如何解释,但清楚自 己的类型,
+        所以是保存单个值的安全的泛型容器,但不能进行不明确的转换。</para>
+      </listitem>
+      <listitem>
+        <para>
+        Indiscriminate types that can refer to anything but are
+        oblivious to the actual underlying type, entrusting all forms
+        of access and interpretation to the programmer. This niche is
+        dominated by <code>void *</code>, which offers plenty of scope
+        for surprising, undefined behavior.<sbr/>
+        不受限制的类型,可以引向任意物但不了解真实的类型,
+        只能依靠程序员在访问和解释该值所用的形式。这种情形其实是由
+        <code>void *</code> 实现,可能会发生大量的意外和未定义行为。</para>
+      </listitem>
+    </itemizedlist>
+
+    <para>The <code><classname>boost::any</classname></code> class
+    (based on the class of the same name described in <ulink
+ url="http://www.two-sdg.demon.co.uk/curbralan/papers/ValuedConversions.pdf";>"Valued
+    Conversions"</ulink> by Kevlin Henney, <emphasis>C++
+    Report</emphasis> 12(7), July/August 2000) is a variant value type
+    based on the second category. It supports copying of any value
+    type and safe checked extraction of that value strictly against
+    its type. A similar design, offering more appropriate operators,
+    can be used for a generalized function adaptor,
+    <code>any_function</code>, a generalized iterator adaptor,
+    <code>any_iterator</code>, and other object types that need
+    uniform runtime treatment but support only compile-time template
+    parameter conformance.<sbr/>
+ <code><classname>boost::any</classname></code> 类(基于Kevlin Henney在 <ulink + url="http://www.two-sdg.demon.co.uk/curbralan/papers/ValuedConversions.pdf";> + "Valued Conversions"</ulink>中所描述的同名类,<emphasis>C++ Report</emphasis>
+    12(7), July/August 2000)是一种基于以上第二种类型的泛型类型。
+ 它支持任意值类型间的复制,以及带严格类型安全检查的值读取。一个类似的设 计, + 可以提供更多合适的操作符,可用于泛型函数适配 器,<code>any_function</code>, + 泛型迭代器适配器,<code>any_iterator</code>, 以及其它需要统一的运行时处 理,
+    但只支持编译时模板参数一致性的对象类型。</para>
+  </section>
+
+  <section>
+    <title>Examples 例子</title>
+
+    <using-namespace name="boost"/>
+    <using-class name="boost::any"/>
+
+    <para>The following code demonstrates the syntax for using
+    implicit conversions to and copying of any objects:<sbr/>
+    以下代码示范了如何隐式转换并复制一个any对象的方法:</para>
+
+<programlisting name="any.example.first">
+#include &lt;list&gt;
+#include &lt;boost/any.hpp&gt;
+
+using <functionname>boost::any_cast</functionname>;
+typedef std::list&lt;<classname>boost::any</classname>&gt; many;
+
+void append_int(many &amp; values, int value)
+{
+    <classname>boost::any</classname> to_append = value;
+    values.push_back(to_append);
+}
+
+void append_string(many &amp; values, const std::string &amp; value)
+{
+    values.push_back(value);
+}
+
+void append_char_ptr(many &amp; values, const char * value)
+{
+    values.push_back(value);
+}
+
+void append_any(many &amp; values, const <classname>boost::any</classname> &amp; value)
+{
+    values.push_back(value);
+}
+
+void append_nothing(many &amp; values)
+{
+    values.push_back(<classname>boost::any</classname>());
+}
+</programlisting>
+
+    <para>The following predicates follow on from the previous
+    definitions and demonstrate the use of queries on any
+    objects:<sbr/>
+    以下谓词续用前面的定义,示范了查询一个any对象的方法:</para>
+
+<programlisting name="any.example.second">
+bool is_empty(const <classname>boost::any</classname> &amp; operand)
+{
+    return operand.<methodname>empty</methodname>();
+}
+
+bool is_int(const <classname>boost::any</classname> &amp; operand)
+{
+    return operand.<methodname>type</methodname>() == typeid(int);
+}
+
+bool is_char_ptr(const <classname>boost::any</classname> &amp; operand)
+{
+    try
+    {
+        <functionname>any_cast</functionname>&lt;const char *&gt;(operand);
+        return true;
+    }
+    catch(const <classname>boost::bad_any_cast</classname> &amp;)
+    {
+        return false;
+    }
+}
+
+bool is_string(const <classname>boost::any</classname> &amp; operand)
+{
+ return <functionname>any_cast</functionname>&lt;std::string&gt;(&amp;operand);
+}
+
+void count_all(many &amp; values, std::ostream &amp; out)
+{
+    out &lt;&lt; "#empty == "
+ &lt;&lt; std::count_if(values.begin(), values.end(), is_empty) &lt;&lt; std::endl;
+    out &lt;&lt; "#int == "
+ &lt;&lt; std::count_if(values.begin(), values.end(), is_int) &lt;&lt; std::endl;
+    out &lt;&lt; "#const char * == "
+ &lt;&lt; std::count_if(values.begin(), values.end(), is_char_ptr) &lt;&lt; std::endl;
+    out &lt;&lt; "#string == "
+ &lt;&lt; std::count_if(values.begin(), values.end(), is_string) &lt;&lt; std::endl;
+}
+</programlisting>
+
+ <para>The following type, patterned after the OMG's Property Service, defines name-value pairs for arbitrary value types:<sbr/> + 以下类型,可用于组成 OMG的 Property Service, 定义了任意值类型的名字-值 对:</para>
+
+<programlisting>
+struct property
+{
+    property();
+ property(const std::string &amp;, const <classname>boost::any</classname> &amp;);
+
+    std::string name;
+    <classname>boost::any</classname> value;
+};
+
+typedef std::list&lt;property&gt; properties;
+</programlisting>
+
+    <para>The following base class demonstrates one approach to
+    runtime polymorphism based callbacks that also require arbitrary
+    argument types. The absence of virtual member templates requires
+    that different solutions have different trade-offs in terms of
+    efficiency, safety, and generality. Using a checked variant type
+    offers one approach:<sbr/>
+ 下面的基类示范了一种实现运行时多态的方法,它基于以任意类型为参数的回调 函数。
+    由于没有虚拟模板成员函数,这就要求其它解决方案都会有效率、
+    安全性或通用性方面的代价。使用经检验的可变类型是一种方法:</para>
+
+<programlisting>
+class consumer
+{
+public:
+    virtual void notify(const <classname>any</classname> &amp;) = 0;
+    ...
+};
+</programlisting>
+  </section>
+
+  <library-reference>
+    <section id="any.ValueType">
+ <title><emphasis>ValueType</emphasis> requirements <emphasis>ValueType</emphasis>的要求</title>
+
+      <para>Values are strongly informational objects for which
+      identity is not significant, i.e. the focus is principally on
+      their state content and any behavior organized around
+      that. Another distinguishing feature of values is their
+      granularity: normally fine-grained objects representing simple
+      concepts in the system such as quantities.<sbr/>
+      值是这样一种对象,它们的个体性并不重要,
+      即主要关注的是它们的状态内容和围绕于此的行为。
+      值的另一个特征是它们的粒度:通常细粒度的对象表示系统中较简单的概念,
+      如数量。</para>
+
+      <para>As the emphasis of a value lies in its state not its
+      identity, values can be copied and typically assigned one to
+      another, requiring the explicit or implicit definition of a
+      public copy constructor and public assignment operator. Values
+      typically live within other scopes, i.e. within objects or
+      blocks, rather than on the heap. Values are therefore normally
+      passed around and manipulated directly as variables or through
+      references, but not as pointers that emphasize identity and
+      indirection.<sbr/>
+      由于值所强调的是它的状态而不是它的个体性,
+      因此值可以被复制或者赋给另一个对象,
+      这需要显式或隐式地定义公有的复制构造函数和公有的赋值操作符。
+      值通常生存于其它的范围中,如在对象中或代码块中,而不是在堆上。
+      因此值通常以变量或通过引用的方式来传递和操作,而不是以指针的方式,
+      指针强调的是个体性和间接性。</para>
+
+      <para>The specific requirements on value types to be used in an
+      <code><classname alt="boost::any">any</classname></code>
+      are:<sbr/>
+      <code><classname alt="boost::any">any</classname></code>
+      中所使用的值类型(value type)有以下特定要求:</para>
+
+      <itemizedlist spacing="compact">
+        <listitem><simpara>A <emphasis>ValueType</emphasis> is
+          <emphasis>CopyConstructible</emphasis> [20.1.3].<sbr/>
+          <emphasis>ValueType</emphasis> 必须是
+          <emphasis>CopyConstructible</emphasis> [20.1.3]的。</simpara>
+        </listitem>
+
+        <listitem><simpara>A <emphasis>ValueType</emphasis> is
+        optionally <emphasis>Assignable</emphasis> [23.1]. The strong
+        exception-safety guarantee is required for all forms of
+        assignment.<sbr/>
+        <emphasis>ValueType</emphasis> 不一定要是
+        <emphasis>Assignable</emphasis> [23.1]的。
+        但要求所有形式的赋值都要保证是强异常安全的。</simpara>
+        </listitem>
+
+        <listitem><simpara>The destructor for a
+        <emphasis>ValueType</emphasis> upholds the no-throw
+        exception-safety guarantee.<sbr/>
+ <emphasis>ValueType</emphasis> 的析构函数要满足不抛出异常的安全保 证。</simpara>
+        </listitem>
+      </itemizedlist>
+    </section>
+
+    <header name="boost/any.hpp">
+      <namespace name="boost">
+        <class name="bad_any_cast">
+          <inherit access="public">
+            <classname>std::bad_cast</classname>
+          </inherit>
+          <purpose>The exception thrown in the event of a failed
+          <code><functionname>any_cast</functionname></code> of an
+          <code><classname>any</classname></code> value.<sbr/>
+          在一个 <code><classname>any</classname></code> 值
+          <code><functionname>any_cast</functionname></code>
+          失败时抛出的异常类型。</purpose>
+
+          <method name="what" specifiers="virtual" cv="const">
+            <type>const char *</type>
+          </method>
+        </class>
+
+        <class name="any">
+          <purpose>A class whose instances can hold instances of any
+          type that satisfies <link
+          linkend="any.ValueType">ValueType</link>
+          requirements.<sbr/>
+ 一个类,其实例可以持有任意满足<link linkend="any.ValueType">ValueType</link>
+          要求的类型的实例。</purpose>
+
+          <constructor>
+ <postconditions><simpara><code>this-&gt;<methodname>empty</methodname>()</code></simpara></postconditions>
+          </constructor>
+
+          <constructor>
+            <parameter name="other">
+              <paramtype>const <classname>any</classname> &amp;</paramtype>
+            </parameter>
+
+            <effects><simpara> Copy constructor that copies content of
+            <code>other</code> into new instance, so that any content
+            is equivalent in both type and value to the content of
+            <code>other</code>, or empty if <code>other</code> is
+            empty. <sbr/>
+            复制构造函数复制 <code>other</code> 的内容到一个新的实例中,
+            因此 any 所含的类型和值都与 <code>other</code> 的一样,
+            如果 <code>other</code> 为空则any也为空。</simpara></effects>
+
+            <throws><simpara>May fail with a
+            <code><classname>std::bad_alloc</classname></code>
+            exception or any exceptions arising from the copy
+            constructor of the contained type.<sbr/>
+ 可能会抛出一个 <code><classname>std::bad_alloc</classname></code> 异常,
+            或者从所含类型的复制构造函数抛出的任意异常。</simpara></throws>
+          </constructor>
+
+          <constructor>
+            <template>
+              <template-type-parameter name="ValueType"/>
+            </template>
+
+            <parameter name="value">
+              <paramtype>const ValueType &amp;</paramtype>
+            </parameter>
+
+            <effects><simpara>Makes a copy of <code>value</code>, so
+            that the initial content of the new instance is equivalent
+            in both type and value to
+            <code>value</code>.<sbr/>
+ 生成一个 <code>value</code> 的拷贝,因此新实例的初始内容的类型 和值与
+            <code>value</code> 一致。</simpara></effects>
+
+ <throws><simpara><code><classname>std::bad_alloc</classname></code>
+            or any exceptions arising from the copy constructor of the
+            contained type.<sbr/>
+            <code><classname>std::bad_alloc</classname></code>
+            或者其它从所含类型的复制构造函数抛出的异常。</simpara></throws>
+          </constructor>
+
+          <destructor>
+            <effects><simpara>Releases any and all resources used in
+            management of instance.<sbr/>
+            释放 any 及所有用于实例管理的资源。</simpara></effects>
+            <throws><simpara>Nothing.<sbr/>无。</simpara></throws>
+          </destructor>
+
+          <copy-assignment>
+            <type><classname>any</classname> &amp;</type>
+
+            <parameter name="rhs">
+              <paramtype>const <classname>any</classname> &amp;</paramtype>
+            </parameter>
+
+            <effects><simpara>Copies content of <code>rhs</code> into
+            current instance, discarding previous content, so that the
+            new content is equivalent in both type and value to the
+            content of <code>rhs</code>, or empty if
+            <code>rhs.<methodname>empty</methodname>()</code>.<sbr/>
+            将 <code>rhs</code> 的内容复制到当前实例,放弃之前的内容,
+            因此新内容的类型和值与 <code>rhs</code> 一致,如果
+ <code>rhs.<methodname>empty</methodname>()</code>, 则也为空。 </simpara></effects>
+
+ <throws><simpara><code><classname>std::bad_alloc</classname></code>
+            or any exceptions arising from the copy constructor of the
+            contained type. Assignment satisfies the strong guarantee
+            of exception safety.<sbr/>
+            <code><classname>std::bad_alloc</classname></code>
+            或者其它从所含类型的复制构造函数抛出的异常。
+            赋值操作应满足强异常安全的保证。</simpara></throws>
+          </copy-assignment>
+
+          <copy-assignment>
+             <template>
+              <template-type-parameter name="ValueType"/>
+            </template>
+
+            <type><classname>any</classname> &amp;</type>
+
+            <parameter name="rhs">
+              <paramtype>const ValueType &amp;</paramtype>
+            </parameter>
+
+            <effects><simpara>Makes a copy of <code>rhs</code>,
+            discarding previous content, so that the new content of is
+            equivalent in both type and value to
+            <code>rhs</code>.<sbr/>
+            生成一个 <code>rhs</code> 的拷贝,放弃之前的内容,
+ 因此新内容的类型和值与 <code>rhs</code> 一致。 </simpara></effects>
+
+ <throws><simpara><code><classname>std::bad_alloc</classname></code>
+            or any exceptions arising from the copy constructor of the
+            contained type. Assignment satisfies the strong guarantee
+            of exception safety.<sbr/>
+            <code><classname>std::bad_alloc</classname></code>
+            或者其它从所含类型的复制构造函数抛出的异常。
+            赋值操作应满足强异常安全的保证。</simpara></throws>
+          </copy-assignment>
+
+          <method-group name="modifiers">
+            <method name="swap">
+              <type><classname>any</classname> &amp;</type>
+
+              <parameter name="rhs">
+                <paramtype><classname>any</classname> &amp;</paramtype>
+              </parameter>
+
+              <effects><simpara>Exchange of the contents of
+              <code>*this</code> and
+              <code>rhs</code>.<sbr/>
+ 交换 <code>*this</code> 和 <code>rhs</code>的内容 </simpara></effects>
+
+              <returns><simpara><code>*this</code></simpara></returns>
+
+              <throws><simpara>Nothing.<sbr/>无。</simpara></throws>
+            </method>
+          </method-group>
+
+          <method-group name="queries">
+            <method name="empty" cv="const">
+              <type>bool</type>
+
+              <returns><simpara><code>true</code> if instance is
+              empty, otherwise <code>false</code>.<sbr/>
+ <code>true</code> 如果实例为空,否则返回 <code>false</code>。 </simpara></returns>
+
+ <throws><simpara>Will not throw.<sbr/>不会抛出异常。 </simpara></throws>
+            </method>
+
+            <method name="type" cv="const">
+ <type>const <classname>std::type_info</classname> &amp;</type>
+
+              <returns><simpara>the <code>typeid</code> of the
+              contained value if instance is non-empty, otherwise
+              <code>typeid(void)</code>.<sbr/>
+              如果实例非空,则返回所含值的 <code>typeid</code>,
+              否则返回 <code>typeid(void)</code>.</simpara></returns>
+
+              <notes><simpara>Useful for querying against types known
+              either at compile time or only at
+              runtime.<sbr/>
+              用于在编译期或运行期查询相应类型。</simpara></notes>
+            </method>
+          </method-group>
+        </class>
+
+        <overloaded-function name="any_cast">
+          <signature>
+            <template>
+              <template-type-parameter name="T"/>
+            </template>
+
+            <type>T</type>
+
+            <parameter name="operand">
+              <paramtype><classname>any</classname> &amp;</paramtype>
+            </parameter>
+          </signature>
+
+          <signature>
+            <template>
+              <template-type-parameter name="T"/>
+            </template>
+
+            <type>T</type>
+
+            <parameter name="operand">
+              <paramtype>const <classname>any</classname> &amp;</paramtype>
+            </parameter>
+          </signature>
+
+          <signature>
+            <template>
+              <template-type-parameter name="ValueType"/>
+            </template>
+
+            <type>const ValueType *</type>
+
+            <parameter name="operand">
+              <paramtype>const <classname>any</classname> *</paramtype>
+            </parameter>
+          </signature>
+
+          <signature>
+            <template>
+              <template-type-parameter name="ValueType"/>
+            </template>
+
+            <type>ValueType *</type>
+
+            <parameter name="operand">
+              <paramtype><classname>any</classname> *</paramtype>
+            </parameter>
+          </signature>
+
+          <purpose><simpara>Custom keyword cast for extracting a value
+          of a given type from an
+          <code><classname>any</classname></code>.<sbr/>
+ 定制转型用于从 <code><classname>any</classname></code> 取出给定类 型的值。</simpara></purpose>
+
+          <returns><simpara> If passed a pointer, it returns a
+          similarly qualified pointer to the value content if
+         successful, otherwise null is returned.
+ If T is ValueType, it returns a copy of the held value, otherwise, if T is a reference + to (possibly const qualified) ValueType, it returns a reference to the held
+         value.<sbr/>
+      如果传入一个指针,则在成功时返回一个具有相同限定的指针,
+      指向所持内容的值,失败则返回null。如果 T 是 ValueType,
+ 则返回所持值的拷贝;如果 T 是一个 ValueType引用(可能是 const 限定的 ),
+      则返回一个所持值的引用。</simpara></returns>
+
+          <throws><simpara>Overloads taking an
+          <code><classname>any</classname></code> pointer do not
+          throw; overloads taking an
+          <code><classname>any</classname></code> value or reference
+          throws <code><classname>bad_any_cast</classname></code> if
+          unsuccessful.<sbr/>
+ 对于 <code><classname>any</classname></code> 指针的重载方式不会抛 出异常; + 而对于 <code><classname>any</classname></code> 值或引用的重载方式 则在失败时抛出 + <code><classname>bad_any_cast</classname></code>。 </simpara></throws>
+
+        </overloaded-function>
+      </namespace>
+    </header>
+  </library-reference>
+
+  <section>
+    <title>Acknowledgements 鸣谢</title>
+
+ <para>Doug Gregor ported the documentation to the BoostBook format.<sbr/>
+    感谢 Doug Gregor 将本文档移植为 BoostBook 格式。</para>
+  </section>
+</library>
=======================================
--- /dev/null
+++ /trunk/libs/array/doc/array.xml     Mon Dec 28 23:05:14 2009
@@ -0,0 +1,601 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+  "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd";>
+<library name="Array" dirname="array" id="array" last-revision="$Date: 2006-12-01 06:34:43 -0500 (Fri, 01 Dec 2006) $">
+  <libraryinfo>
+    <author>
+      <firstname>Nicolai</firstname>
+      <surname>Josuttis</surname>
+    </author>
+
+    <copyright>
+      <year>2001</year>
+      <year>2002</year>
+      <year>2003</year>
+      <year>2004</year>
+      <holder>Nicolai M. Josuttis</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>
+    </legalnotice>
+
+ <librarypurpose>STL compliant container wrapper for arrays of constant size</librarypurpose>
+    <librarycategory name="category:containers"/>
+  </libraryinfo>
+
+  <title>Boost.Array</title>
+
+  <section id="array.intro">
+    <title>Introduction 简介</title>
+
+    <using-namespace name="boost"/>
+    <using-class name="array"/>
+
+    <para>The C++ Standard Template Library STL as part of the C++
+    Standard Library provides a framework for processing algorithms on
+    different kind of containers. However, ordinary arrays don't
+    provide the interface of STL containers (although, they provide
+    the iterator interface of STL containers).<sbr/>
+ 作为 C++ 标准库的一部分,C++ 标准模板库(Standard Template Library STL)
+    提供了一个用于各种不同容器的处理算法的框架。然而,普通数组不提供 STL
+    容器的接口(尽管它们提供了 STL 容器的迭代器接口)。</para>
+
+    <para>As replacement for ordinary arrays, the STL provides class
+    <code><classname>std::vector</classname></code>.  However,
+    <code><classname>std::vector&lt;&gt;</classname></code> provides
+    the semantics of dynamic arrays. Thus, it manages data to be able
+    to change the number of elements. This results in some overhead in
+    case only arrays with static size are needed.<sbr/>
+ 为了代替普通数组,STL 提供了 <code><classname>std::vector</classname></code>。 + 但是,<code><classname>std::vector&lt;&gt;</classname></code> 提供动态 数组的语义。 + 因此,它管理元素数量会发生变化的数据。这导致的负担超出仅有静态大小的数 组的需要。</para>
+
+    <para>In his book, <emphasis>Generic Programming and the
+    STL</emphasis>, Matthew H. Austern introduces a useful wrapper
+    class for ordinary arrays with static size, called
+    <code>block</code>.  It is safer and has no worse performance than
+    ordinary arrays. In <emphasis>The C++ Programming
+    Language</emphasis>, 3rd edition, Bjarne Stroustrup introduces a
+    similar class, called <code>c_array</code>, which I (<ulink
+    url="http://www.josuttis.com";>Nicolai Josuttis</ulink>) present
+    slightly modified in my book <emphasis>The C++ Standard Library -
+    A Tutorial and Reference</emphasis>, called
+    <code>carray</code>. This is the essence of these approaches
+    spiced with many feedback from <ulink
+    url="http://www.boost.org";>boost</ulink>.<sbr/>
+ Matthew H. Austern 在他的著作 <emphasis>Generic Programming and the STL</emphasis> 中, + 提出了一个用于静态大小的普通数组的有用的包装类,名叫 <code>block</code>。 + 它更加安全,而且性能也不输于普通数组。在 <emphasis>The C++ Programming Language</emphasis> + 第三版中,Bjarne Stroustrup 提出了一个类似的类,名叫 <code>c_array</code>, + 我 (<ulink url="http://www.josuttis.com";>Nicolai Josuttis</ulink>) 对它 稍加改变, + 放到了我的书 <emphasis>The C++ Standard Library - A Tutorial and Reference</emphasis> 中,
+    名叫 <code>carray</code>。这些方法中的一些基本的东西都在 <ulink
+    url="http://www.boost.org";>boost</ulink> 中得到了反应。</para>
+
+    <para>After considering different names, we decided to name this
+    class simply <code><classname>array</classname></code>.<sbr/>
+    考虑了各种不同的名字后,我决定给这个类一个简单的名字,
+    <code><classname>array</classname></code>。</para>
+
+    <para>Note that this class is suggested to be part of the next
+    Technical Report, which will extend the C++ Standard (see
+ <ulink url="http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1548.htm";>http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1548.htm</ulink>).<sbr/>
+    注意,这个类已经被建议为下一版扩展 C++ 标准的技术报告的一部分(参见
+ <ulink url="http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1548.htm";>http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1548.htm</ulink>)。 </para>
+
+    <para>Class <code><classname>array</classname></code> fulfills most
+    but not all of the requirements of "reversible containers" (see
+    Section 23.1, [lib.container.requirements] of the C++
+    Standard). The reasons array is not an reversible STL container is
+    because:<sbr/>
+    类 <code><classname>array</classname></code> 实现了大部分但不是全部的
+ “可逆容器”的需求(参见 C++ 标准的 23.1, [lib.container.requirements])。
+    array 不是一个 STL 可逆容器的原因在于:
+      <itemizedlist spacing="compact">
+        <listitem><simpara>No constructors are provided.<sbr/>
+            没有提供构造函数。</simpara></listitem>
+ <listitem><simpara>Elements may have an undetermined initial value (see <xref linkend="array.rationale"/>).<sbr/> + 元素可能有一个不确定的初始值(参见 <xref linkend="array.rationale"/>)。</simpara></listitem> + <listitem><simpara><functionname>swap</functionname>() has no constant complexity.<sbr/> + <functionname>swap</functionname>() 不具有常量复杂度。 </simpara></listitem> + <listitem><simpara><methodname>size</methodname>() is always constant, based on the second template argument of the type.<sbr/> + <methodname>size</methodname>() 基于第二个模板参数的类型,总是 恒定的。</simpara></listitem> + <listitem><simpara>The container provides no allocator support.<sbr/>
+            容器不提供分配器支持。</simpara></listitem>
+      </itemizedlist>
+    </para>
+
+ <para>It doesn't fulfill the requirements of a "sequence" (see Section 23.1.1, [lib.sequence.reqmts] of the C++ Standard), except that:<sbr/> + 它没有实现“序列”的需求(参见 C++ 标准的 23.1.1, [lib. sequence.reqmts]),但以下这些除外:
+      <itemizedlist spacing="compact">
+ <listitem><simpara><methodname>front</methodname>() and <methodname>back</methodname>() are provided.<sbr/> + 提供了 <methodname>front</methodname>() 和 <methodname>back</methodname>()。 </simpara></listitem> + <listitem><simpara><methodname>operator[]</methodname> and <methodname>at</methodname>() are provided.<sbr/> + 提供了 <methodname>operator[]</methodname> 和 <methodname>at</methodname>()。 </simpara></listitem>
+      </itemizedlist>
+    </para>
+  </section>
+
+  <library-reference>
+    <header name="boost/array.hpp">
+      <namespace name="boost">
+        <class name="array">
+          <template>
+            <template-type-parameter name="T"/>
+            <template-nontype-parameter name="N">
+              <type>std::size_t</type>
+            </template-nontype-parameter>
+          </template>
+
+ <purpose><para>STL compliant container wrapper for arrays of constant size<sbr/>
+          服从 STL 风格的针对常量大小数组的容器包装</para></purpose>
+          <typedef name="value_type">
+            <type>T</type>
+          </typedef>
+          <typedef name="iterator">
+             <type>T*</type>
+          </typedef>
+          <typedef name="const_iterator">
+             <type>const T*</type>
+          </typedef>
+          <typedef name="reverse_iterator">
+ <type><classname>std::reverse_iterator</classname>&lt;iterator&gt;</type>
+          </typedef>
+          <typedef name="const_reverse_iterator">
+ <type><classname>std::reverse_iterator</classname>&lt;const_iterator&gt;</type>
+          </typedef>
+          <typedef name="reference">
+             <type>T&amp;</type>
+          </typedef>
+          <typedef name="const_reference">
+             <type>const T&amp;</type>
+          </typedef>
+          <typedef name="size_type">
+             <type>std::size_t</type>
+          </typedef>
+          <typedef name="difference_type">
+             <type>std::ptrdiff_t</type>
+          </typedef>
+
+          <static-constant name="static_size">
+            <type>size_type</type>
+            <default>N</default>
+          </static-constant>
+
+          <copy-assignment>
+            <template>
+              <template-type-parameter name="U"/>
+            </template>
+            <parameter name="other">
+ <paramtype>const <classname>array</classname>&lt;U, N&gt;&amp;</paramtype>
+            </parameter>
+ <effects><simpara><code>std::copy(rhs.<methodname>begin</methodname>(),rhs.<methodname>end</methodname>(), <methodname>begin</methodname>())</code></simpara></effects>
+          </copy-assignment>
+
+          <method-group name="iterator support">
+            <overloaded-method name="begin">
+              <signature>
+                <type>iterator</type>
+              </signature>
+              <signature cv="const">
+                <type>const_iterator</type>
+              </signature>
+
+ <returns><simpara>iterator for the first element<sbr/>位于第 一个元素的迭代器</simpara></returns> + <throws><simpara>will not throw<sbr/>不抛出异常 </simpara></throws>
+            </overloaded-method>
+
+            <overloaded-method name="end">
+              <signature>
+                <type>iterator</type>
+              </signature>
+              <signature cv="const">
+                <type>const_iterator</type>
+              </signature>
+
+ <returns><simpara>iterator for position after the last element<sbr/>
+              位于最后一个元素之后位置的迭代器</simpara></returns>
+ <throws><simpara>will not throw<sbr/>不抛出异常 </simpara></throws>
+            </overloaded-method>
+          </method-group>
+
+          <method-group name="reverse iterator support">
+            <overloaded-method name="rbegin">
+              <signature>
+                <type>reverse_iterator</type>
+              </signature>
+              <signature cv="const">
+                <type>const_reverse_iterator</type>
+              </signature>
+
+ <returns><simpara>reverse iterator for the first element of reverse iteration<sbr/>
+              位于反向迭代的第一个元素的反向迭代器</simpara></returns>
+            </overloaded-method>
+
+            <overloaded-method name="rend">
+              <signature>
+                <type>reverse_iterator</type>
+              </signature>
+              <signature cv="const">
+                <type>const_reverse_iterator</type>
+              </signature>
+
+ <returns><simpara>reverse iterator for position after the last element in reverse iteration<sbr/> + 位于反向迭代的最后一个元素之后位置的反向迭代器 </simpara></returns>
+            </overloaded-method>
+          </method-group>
+
+          <method-group name="capacity">
+            <method name="size">
+              <type>size_type</type>
+              <returns><simpara><code>N</code></simpara></returns>
+            </method>
+            <method name="empty">
+              <type>bool</type>
+              <returns><simpara><code>N==0</code></simpara></returns>
+ <throws><simpara>will not throw<sbr/>不抛出异常 </simpara></throws>
+            </method>
+            <method name="max_size">
+              <type>size_type</type>
+              <returns><simpara><code>N</code></simpara></returns>
+ <throws><simpara>will not throw<sbr/>不抛出异常 </simpara></throws>
+            </method>
+          </method-group>
+
+          <method-group name="element access">
+            <overloaded-method name="operator[]">
+              <signature>
+                <type>reference</type>
+                <parameter name="i">
+                  <paramtype>size_type</paramtype>
+                </parameter>
+              </signature>
+
+              <signature cv="const">
+                <type>const_reference</type>
+                <parameter name="i">
+                  <paramtype>size_type</paramtype>
+                </parameter>
+              </signature>
+
+              <requires><simpara><code>i &lt; N</code></simpara></requires>
+              <returns><simpara>element with index <code>i</code><sbr/>
+              索引为 <code>i</code> 的元素</simpara></returns>
+ <throws><simpara>will not throw<sbr/>不抛出异 常.</simpara></throws>
+            </overloaded-method>
+
+            <overloaded-method name="at">
+              <signature>
+                <type>reference</type>
+                <parameter name="i">
+                  <paramtype>size_type</paramtype>
+                </parameter>
+              </signature>
+
+              <signature cv="const">
+                <type>const_reference</type>
+                <parameter name="i">
+                  <paramtype>size_type</paramtype>
+                </parameter>
+              </signature>
+
+              <returns><simpara>element with index <code>i</code><sbr/>
+              索引为 <code>i</code> 的元素</simpara></returns>
+ <throws><simpara><code><classname>std::range_error</classname></code> if <code>i &gt;= N</code></simpara></throws>
+            </overloaded-method>
+
+            <overloaded-method name="front">
+              <signature>
+                <type>reference</type>
+              </signature>
+              <signature cv="const">
+                <type>const_reference</type>
+              </signature>
+              <requires><simpara><code>N &gt; 0</code></simpara></requires>
+ <returns><simpara>the first element<sbr/>第一个元素 </simpara></returns> + <throws><simpara>will not throw<sbr/>不抛出异常 </simpara></throws>
+            </overloaded-method>
+
+            <overloaded-method name="back">
+              <signature>
+                <type>reference</type>
+              </signature>
+              <signature cv="const">
+                <type>const_reference</type>
+              </signature>
+              <requires><simpara><code>N &gt; 0</code></simpara></requires>
+ <returns><simpara>the last element<sbr/>最后一个元素 </simpara></returns> + <throws><simpara>will not throw<sbr/>不抛出异常 </simpara></throws>
+            </overloaded-method>
+
+            <method name="data" cv="const">
+              <type>const T*</type>
+              <returns><simpara><code>elems</code></simpara></returns>
+ <throws><simpara>will not throw<sbr/>不抛出异常 </simpara></throws>
+            </method>
+
+           <method name="c_array">
+              <type>T*</type>
+              <returns><simpara><code>elems</code></simpara></returns>
+ <throws><simpara>will not throw<sbr/>不抛出异常 </simpara></throws>
+            </method>
+          </method-group>
+
+          <method-group name="modifiers">
+            <method name="swap">
+              <type>void</type>
+              <parameter name="other">
+ <paramtype><classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
+              </parameter>
+ <effects><simpara><code>std::swap_ranges(<methodname>begin</methodname>(), <methodname>end</methodname>(), other.<methodname>begin</methodname>())</code></simpara></effects> + <complexity><simpara>linear in <code>N</code><sbr/>基于 <code>N</code> 的线性增长</simpara></complexity>
+            </method>
+            <method name="assign">
+              <type>void</type>
+              <parameter name="value">
+                <paramtype>const T&amp;</paramtype>
+              </parameter>
+ <effects><simpara><code>std::fill_n(<methodname>begin</methodname>(), N, value)</code></simpara></effects>
+            </method>
+          </method-group>
+
+          <data-member name="elems[N]"> <!-- HACK -->
+            <type>T</type>
+          </data-member>
+
+          <free-function-group name="specialized algorithms">
+            <function name="swap">
+              <template>
+                <template-type-parameter name="T"/>
+                <template-nontype-parameter name="N">
+                  <type>std::size_t</type>
+                </template-nontype-parameter>
+              </template>
+
+              <type>void</type>
+
+              <parameter name="x">
+ <paramtype><classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
+              </parameter>
+              <parameter name="y">
+ <paramtype><classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
+              </parameter>
+
+ <effects><simpara><code>x.<methodname>swap</methodname>(y)</code></simpara></effects> + <throws><simpara>will not throw<sbr/>不抛出异 常.</simpara></throws>
+            </function>
+          </free-function-group>
+
+          <free-function-group name="comparisons">
+            <function name="operator==">
+              <template>
+                <template-type-parameter name="T"/>
+                <template-nontype-parameter name="N">
+                  <type>std::size_t</type>
+                </template-nontype-parameter>
+              </template>
+
+              <type>bool</type>
+
+              <parameter name="x">
+ <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
+              </parameter>
+              <parameter name="y">
+ <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
+              </parameter>
+
+ <returns><simpara><code>std::equal(x.<methodname>begin</methodname>(), x.<methodname>end</methodname>(), y.<methodname>begin</methodname>())</code></simpara>
+              </returns>
+            </function>
+
+            <function name="operator!=">
+              <template>
+                <template-type-parameter name="T"/>
+                <template-nontype-parameter name="N">
+                  <type>std::size_t</type>
+                </template-nontype-parameter>
+              </template>
+
+              <type>bool</type>
+
+              <parameter name="x">
+ <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
+              </parameter>
+              <parameter name="y">
+ <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
+              </parameter>
+
+              <returns><simpara><code>!(x == y)</code></simpara>
+              </returns>
+            </function>
+
+            <function name="operator&lt;">
+              <template>
+                <template-type-parameter name="T"/>
+                <template-nontype-parameter name="N">
+                  <type>std::size_t</type>
+                </template-nontype-parameter>
+              </template>
+
+              <type>bool</type>
+
+              <parameter name="x">
+ <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
+              </parameter>
+              <parameter name="y">
+ <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
+              </parameter>
+
+ <returns><simpara><code>std::lexicographical_compare(x.<methodname>begin</methodname>(), x.<methodname>end</methodname>(), y.<methodname>begin</methodname>(), y.<methodname>end</methodname>())</code></simpara>
+              </returns>
+            </function>
+
+            <function name="operator&gt;">
+              <template>
+                <template-type-parameter name="T"/>
+                <template-nontype-parameter name="N">
+                  <type>std::size_t</type>
+                </template-nontype-parameter>
+              </template>
+
+              <type>bool</type>
+
+              <parameter name="x">
+ <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
+              </parameter>
+              <parameter name="y">
+ <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
+              </parameter>
+
+              <returns><simpara><code>y &lt; x</code></simpara></returns>
+            </function>
+
+            <function name="operator&lt;=">
+              <template>
+                <template-type-parameter name="T"/>
+                <template-nontype-parameter name="N">
+                  <type>std::size_t</type>
+                </template-nontype-parameter>
+              </template>
+
+              <type>bool</type>
+
+              <parameter name="x">
+ <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
+              </parameter>
+              <parameter name="y">
+ <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
+              </parameter>
+
+ <returns><simpara><code>!(y &lt; x)</code></simpara></returns>
+            </function>
+
+            <function name="operator&gt;=">
+              <template>
+                <template-type-parameter name="T"/>
+                <template-nontype-parameter name="N">
+                  <type>std::size_t</type>
+                </template-nontype-parameter>
+              </template>
+
+              <type>bool</type>
+
+              <parameter name="x">
+ <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
+              </parameter>
+              <parameter name="y">
+ <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
+              </parameter>
+
+ <returns><simpara><code>!(x &lt; y)</code></simpara></returns>
+            </function>
+          </free-function-group>
+        </class>
+      </namespace>
+    </header>
+  </library-reference>
+
+<section id="array.rationale">
+  <title>Design Rationale 设计原则</title>
+
+  <para>There was an important design tradeoff regarding the
+  constructors: We could implement array as an "aggregate" (see
+  Section 8.5.1, [dcl.init.aggr], of the C++ Standard). This would
+  mean:<sbr/>
+  有一个重要的关于构造函数的设计权衡:我们可以将 array 实现为一个“集合体”
+  (参见 C++ 标准的 8.5.1, [dcl.init.aggr])。这就意味着:
+    <itemizedlist>
+      <listitem><simpara>An array can be initialized with a
+      brace-enclosing, comma-separated list of initializers for the
+      elements of the container, written in increasing subscript
+      order:<sbr/>
+      一个数组能被一个大括号括起来的,逗号分隔的初始化列表初始化,
+      初始化列表中的值按照容器中各元素的下标递增的顺序排列:</simpara>
+
+ <programlisting><classname>boost::array</classname>&lt;int,4&gt; a = { { 1, 2, 3 } };</programlisting>
+
+      <simpara>Note that if there are fewer elements in the
+      initializer list, then each remaining element gets
+      default-initialized (thus, it has a defined value).<sbr/>
+      注意,如果初始化列表中的值少于元素的个数,则多余的元素会被默认初始化
+      (这样,它就有了一个已定义的值)。</simpara>
+  </listitem></itemizedlist></para>
+
+  <para>However, this approach has its drawbacks: <emphasis
+  role="bold"> passing no initializer list means that the elements
+  have an indetermined initial value</emphasis>, because the rule says
+  that aggregates may have:<sbr/>
+ 然而,这种方法也有它的劣势:<emphasis role="bold">不传递初始化列表意味着 元素有一个不确定的初始值
+  </emphasis>,因为规则规定集合体应该:
+    <itemizedlist>
+      <listitem><simpara>No user-declared constructors.<sbr/>
+        无用户声明的构造函数。</simpara></listitem>
+ <listitem><simpara>No private or protected non-static data members.<sbr/>
+        无私有的或保护的非静态数据成员。</simpara></listitem>
+      <listitem><simpara>No base classes.<sbr/>
+        无基类。</simpara></listitem>
+      <listitem><simpara>No virtual functions.<sbr/>
+        无虚拟函数。</simpara></listitem>
+    </itemizedlist>
+  </para>
+
+  <para>Nevertheless, The current implementation uses this approach.<sbr/>
+  无论如何,当前的实现使用了这个方法。</para>
+
+  <para>Note that for standard conforming compilers it is possible to
+  use fewer braces (according to 8.5.1 (11) of the Standard). That is,
+  you can initialize an array as follows:<sbr/>
+ 注意,对于与标准兼容的编译器,可能会使用更少的大括号(根据标准的 8.5.1 (11))。
+  也就是说,你可以像这样初始化一个 array:</para>
+
+<programlisting>
+<classname>boost::array</classname>&lt;int,4&gt; a = { 1, 2, 3 };
+</programlisting>
+
+  <para>I'd appreciate any constructive feedback. <emphasis
+  role="bold">Please note: I don't have time to read all boost
+  mails. Thus, to make sure that feedback arrives to me, please send
+  me a copy of each mail regarding this class.</emphasis><sbr/>
+ 我感激任何有建设性的反馈。<emphasis role="bold">请注意:我没有时间阅读所 有的 boost 邮件。 + 因此,为了确保反馈能被我收到,请把关于这个类的每一封邮件发给我一份拷贝。 </emphasis></para>
+
+  <para>The code is provided "as is" without expressed or implied
+  warranty.<sbr/>
+  代码就按照原样提供,不带有任何明显的或隐含的授权。</para>
+
+</section>
+
+<section id="array.more.info">
+  <title>For more information... 更多信息...</title>
+  <para>To find more details about using ordinary arrays in C++ and
+  the framework of the STL, see e.g.<sbr/>
+  要寻找关于使用 C++ 普通数组和 STL 框架的更多细节,请看
+
+    <literallayout>The C++ Standard Library - A Tutorial and Reference
+by Nicolai M. Josuttis
+Addison Wesley Longman, 1999
+ISBN 0-201-37926-0</literallayout>
+   </para>
+
+  <para><ulink url="http://www.josuttis.com/";>Home Page of Nicolai
+  Josuttis</ulink></para>
+</section>
+
+<section id="array.ack">
+  <title>Acknowledgements 鸣谢</title>
+
+  <para>Doug Gregor ported the documentation to the BoostBook format.<sbr/>
+  感谢 Doug Gregor 将本文档移植至 BoostBook 格式</para>
+</section>
+
+<!-- Notes:
+   empty() should return N != 0
+   size(), empty(), max_size() should be const
+   -->
+
+</library>
=======================================
--- /dev/null
+++ /trunk/libs/bind/doc/Jamfile.v2     Mon Dec 28 23:05:14 2009
@@ -0,0 +1,13 @@
+#   Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
+
+#   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)
+project boost/doc ;
+import boostbook : boostbook ;
+
+boostbook ref-doc : ref.xml
+       :
+ <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
+       ;
+
=======================================
--- /dev/null
+++ /trunk/libs/concept_check/doc/Jamfile.v2    Mon Dec 28 23:05:14 2009
@@ -0,0 +1,7 @@
+project boost/concepts ;
+import boostbook : boostbook ;
+
+boostbook concepts : reference/concepts.xml
+       :
+ <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
+       ;
=======================================
--- /dev/null
+++ /trunk/libs/concept_check/doc/reference/Assignable.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,61 @@
+<?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.<sbr/>
+    可赋值类型必须具有复制构造函数、用于赋值的 <code>operator=</code>,
+    并定义了 <code>swap()</code> 函数。</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><sbr/>要求 <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<sbr/>要求 <code>swap()</code> 函数</semantics>
+  </valid-expression>
+
+  <example-model>
+    <type name="int"/>
+  </example-model>
+</concept>
=======================================
--- /dev/null
+++ /trunk/libs/concept_check/doc/reference/BidirectionalIterator.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,147 @@
+<?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.<sbr/>
+  双向迭代器是一种可以读入一组值的序列的迭代器。它可以从两个方向遍历序列,
+  可以是可写的(所指数据可以改变)或不可写的。</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).<sbr/>
+  迭代器表示了在一个序列中的某个位置。因此,迭代器可以指向序列内部
+ (在提领时返回一个值且可以递增),或者指向序列末端之后(不可提领且不可递增 )。</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<sbr/>迭代器的值类 型</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<sbr/>迭代器的类别 </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><sbr/>
+    <code>i</code> 是可递增的(不是 off-the-end)且存在某个可提领的迭代器
+    <code>j</code> 满足 <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<sbr/>与前缀递减相同 </precondition> + <semantics>Equivalent to <code>{Iter j = i; --i; return j;}</code><sbr/>
+    等价于 <code>{Iter j = i; --i; return j;}</code></semantics>
+    <postcondition><code>i</code> is dereferenceable or
+    off-the-end<sbr/>
+    <code>i</code> 为可提领的或 off-the-end</postcondition>
+  </valid-expression>
+
+  <complexity>
+  All iterator operations must take amortized constant time.<sbr/>
+  迭代器的所有操作必须为分期常量时间复杂度。
+  </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.<sbr/>
+ <code>++i; --i;</code> 和 <code>--i; ++i;</code> 必须以原来的 <code>i</code>
+  值结束,如果 <code>i</code> 在两个操作中均有效。
+  </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>
=======================================
--- /dev/null
+++ /trunk/libs/concept_check/doc/reference/CopyConstructible.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,48 @@
+<?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.<sbr/>
+  可复制构造的类型必须能够从该类型的另一个对象进行构造。</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.<sbr/>要求复制构造函数。 </semantics>
+  </valid-expression>
+
+  <example-model>
+    <type name="int"/>
+  </example-model>
+</concept>
=======================================
--- /dev/null
+++ /trunk/libs/concept_check/doc/reference/DefaultConstructible.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,42 @@
+<?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.<sbr/>
+  可缺省构造的对象只需具有一个缺省构造函数。</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.<sbr/>
+    以缺省参数构造该类型的一个实例。</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>
=======================================
--- /dev/null
+++ /trunk/libs/concept_check/doc/reference/EqualityComparable.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,64 @@
+<?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.<sbr/>
+ 可等价比较的类型必须有 <code>==</code> 和 <code>!=</code> 操作符。 </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>
=======================================
--- /dev/null
+++ /trunk/libs/concept_check/doc/reference/ForwardIterator.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,185 @@
+<?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.<sbr/>
+ 前向迭代器是一种可以读入一组值的序列的迭代器。它是多遍的(迭代器的旧值可以 重用),
+  可以是可写的(所指数据可以改变)或不可写的。</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).<sbr/>
+  迭代器表示了在一个序列中的某个位置。因此,迭代器可以指向序列内部
+ (在提领时返回一个值且可以递增),或者指向序列末端之后(不可提领且不可递增 )。</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<sbr/>迭代器的值类 型</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<sbr/>迭代器的类别 </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)<sbr/>
+    <code>i</code> 是可递增的(不是 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)<sbr/>
+    <code>i</code> 是可递增的(不是 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)<sbr/>
+    <code>i</code> 是可递增的(不是 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)<sbr/>
+    <code>i</code> 是可递增的(不是 off-the-end)</precondition>
+ <semantics>Equivalent to <code>{Iter j = i; ++i; return j;}</code><sbr/>
+    等价于 <code>{Iter j = i; ++i; return j;}</code></semantics>
+    <postcondition><code>i</code> is dereferenceable or
+    off-the-end<sbr/>
+    <code>i</code> 为可提领的或 off-the-end</postcondition>
+  </valid-expression>
+
+  <complexity>
+  All iterator operations must take amortized constant time.<sbr/>
+  迭代器的所有操作必须为分期常量时间复杂度。
+  </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>
=======================================
--- /dev/null
+++ /trunk/libs/concept_check/doc/reference/InputIterator.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,183 @@
+<?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.<sbr/>
+ 输入迭代器是一种可以读入一组值的序列的迭代器。它是单遍的(迭代器的旧值不可 重用)和只读的。</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).<sbr/>
+ 输入迭代器表示了在一个序列中的某个位置。因此,迭代器可以指向序列内部(在提 领时返回一个值且可以递增),
+  或者指向序列末端之后(不可提领且不可递增)。</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)<sbr/>
+ 迭代器的值类型(不一定是 <code>*i</code> 所返回的 )</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<sbr/>
+    迭代器的距离类型</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<sbr/>
+    迭代器的类别</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)<sbr/>
+    <code>i</code> 是可递增的(不是 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)<sbr/>
+    <code>i</code> 是可递增的(不是 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)<sbr/>
+    <code>i</code> 是可递增的(不是 off-the-end)</precondition>
+    <semantics>Equivalent to <code>(void)(++i)</code><sbr/>
+    等价于 <code>(void)(++i)</code></semantics>
+    <postcondition><code>i</code> is dereferenceable or
+    off-the-end<sbr/>
+    <code>i</code> 为可提领的或 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)<sbr/>
+    <code>i</code> 是可递增的(不是 off-the-end)</precondition>
+ <semantics>Equivalent to <code>{value_type t = *i; ++i; return t;}</code><sbr/>
+    等价于 <code>{value_type t = *i; ++i; return t;}</code></semantics>
+    <postcondition><code>i</code> is dereferenceable or
+    off-the-end<sbr/>
+    <code>i</code> 为可提领的或 off-the-end</postcondition>
+  </valid-expression>
+
+  <complexity>
+  All iterator operations must take amortized constant time.<sbr/>
+  迭代器的所有操作必须为分期常量时间复杂度。
+  </complexity>
+
+  <example-model>
+    <type name="std::istream_iterator"/>
+  </example-model>
+
+  <see-also concept="OutputIterator"/>
+  <see-also concept="ForwardIterator"/>
+
+</concept>
=======================================
--- /dev/null
+++ /trunk/libs/concept_check/doc/reference/LessThanComparable.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,87 @@
+<?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.<sbr/>
+ 可比较大小的类型必须有 <code>&lt;</code>, <code>&gt;</code>, <code>&lt;=</code>,
+  和 <code>&gt;=</code> 操作符。</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.<sbr/>
+    判断一个值是否小于另一个值。</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.<sbr/>
+    判断一个值是否小于等于另一个值。</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.<sbr/>
+    判断一个值是否大于另一个值。</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.<sbr/>
+    判断一个值是否大于等于另一个值。</semantics>
+  </valid-expression>
+
+  <example-model>
+    <type name="int"/>
+  </example-model>
+</concept>
=======================================
--- /dev/null
+++ /trunk/libs/concept_check/doc/reference/OutputIterator.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,222 @@
+<?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.<sbr/>
+ 输出迭代器是一种可以写出一组值的序列的迭代器。它是单遍的(迭代器的旧值不可 重用)和只写的。</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).<sbr/>
+  输出迭代器表示了在一个序列(可能是无限的)中的某个位置。因此,
+  迭代器可以指向序列内部(在提领时返回一个值且可以递增),
+  或者指向序列末端之后(不可提领且不可递增)</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).<sbr/>
+    迭代器声明的值类型(对于不符合其它迭代器概念的输出迭代器,
+    可以为<code>void</code>)</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<sbr/>
+    迭代器的距离类型</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<sbr/>
+    迭代器的类别</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)<sbr/>
+    <code>i</code> 是可递增的(不是 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)<sbr/>
+    <code>i</code> 是可递增的(不是 off-the-end)</precondition>
+    <postcondition><code>*i</code> may not be written to again until it has
+    been incremented.<sbr/>
+    <code>*i</code> 可能是不可写的,直至被递增后。</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)<sbr/>
+    <code>i</code> 是可递增的(不是 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)<sbr/>
+    <code>i</code> 是可递增的(不是 off-the-end)</precondition>
+    <semantics>Equivalent to <code>(void)(++i)</code><sbr/>
+    等价于 <code>(void)(++i)</code></semantics>
+    <postcondition><code>i</code> is dereferenceable or
+    off-the-end<sbr/>
+    <code>i</code> 为可提领的或 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)<sbr/>
+    <code>i</code> 是可递增的(不是 off-the-end)</precondition>
+    <semantics>Equivalent to <code>{*i = t; ++i;}</code><sbr/>
+    等价于 <code>{*i = t; ++i;}</code></semantics>
+    <postcondition><code>i</code> is dereferenceable or
+    off-the-end<sbr/>
+    <code>i</code> 为可提领的或 off-the-end</postcondition>
+  </valid-expression>
+
+  <complexity>
+  All iterator operations must take amortized constant time.<sbr/>
+  迭代器的所有操作必须为分期常量时间复杂度。
+  </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>
=======================================
--- /dev/null
+++ /trunk/libs/concept_check/doc/reference/RandomAccessIterator.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,338 @@
+<?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.<sbr/>
+  随机访问迭代器是一种可以读入一组值的序列的迭代器。
+  它可以从两个方向遍历序列(在常量时间内跳过任意数量),
+  可以是可写的(所指数据可以改变)或不可写的。</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).<sbr/>
+  迭代器表示了在一个序列中的某个位置。因此,迭代器可以指向序列内部
+ (在提领时返回一个值且可以递增),或者指向序列末端之后(不可提领且不可递增 )。</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<sbr/>迭代器的值类 型</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<sbr/>迭代器的类别 </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)<sbr/>
+    迭代器的距离类型(以两个迭代器间的步数来测量)</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.<sbr/>
+ 如果 <code>n</code> 为正,则等价于执行 <code>n</code> 次 <code>i++</code>, + 如果 <code>n</code> 为负,则等价于执行 <code>-n</code> 次 <code>i--</code>,
+    如果 <code>n</code> 为零则无操作。</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.<sbr/>
+ 如果 <code>n</code> 为正,则等价于执行 <code>n</code> 次 <code>i++</code>, + 如果 <code>n</code> 为负,则等价于执行 <code>-n</code> 次 <code>i--</code>,
+    如果 <code>n</code> 为零则无操作。</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><sbr/>
+    等价于 <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><sbr/>
+    等价于 <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><sbr/>
+    等价于 <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><sbr/>
+    等价于 <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><sbr/>
+    等价于 <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><sbr/>
+    等价于 <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><sbr/>
+    等价于 <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><sbr/>
+    等价于 <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>.<sbr/>
+    <code>i</code> 递增(或递减,如果结果为负)至 <code>j</code> 的次数。
+    如果 <code>j</code> 不可从 <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><sbr/>
+    等价于 <code>*(i + n)</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><sbr/>
+    等价于 <code>*(i + n)</semantics>
+  </valid-expression>
+
+  <complexity>
+  All iterator operations must take amortized constant time.<sbr/>
+  迭代器的所有操作必须为分期常量时间复杂度。
+  </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>
=======================================
--- /dev/null
+++ /trunk/libs/concept_check/doc/reference/SignedInteger.xml Mon Dec 28 23:05:14 2009
@@ -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>
=======================================
--- /dev/null
+++ /trunk/libs/concept_check/doc/reference/concepts.xml Mon Dec 28 23:05:14 2009
@@ -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: 2009-07-26 16:11:03 -0400 (Sun, 26 Jul 2009) $">
+  <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>
=======================================
--- /dev/null
+++ /trunk/libs/date_time/xmldoc/Jamfile.v2     Mon Dec 28 23:05:14 2009
@@ -0,0 +1,89 @@
+# Copyright (c) 2002-2006 CrystalClear Software, Inc.
+# Use, modification and distribution is subject to the
+# Boost Software License, Version 1.0. (See accompanying
+# file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+#
+
+import boostbook : boostbook ;
+import toolset ;
+import set ;
+toolset.using doxygen ;
+
+boostbook date_time : date_time.xml
+       :
+ <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
+        <dependency>date_time_autodoc
+        <dependency>gregorian_autodoc
+        <dependency>posix_time_autodoc
+        <dependency>local_time_autodoc
+       ;
+
+# boostbook date_time_doc : exclusive_date_time.xml ;
+
+# file lists take the form of [ set.difference [ glob include/these ] : [ glob but/not/these ] ]
+
+local date_time_files = [ glob ../../../boost/date_time/*.hpp ] ;
+
+# local date_time_files = [ set.difference
+#      [ glob ../../../boost/date_time/*.hpp ] :
+#      [ glob ../../../boost/date_time/testfrmwk.hpp
+#      #       ../../../boost/date_time/time_zone_base.hpp
+#      #       ../../../boost/date_time/time_zone_names.hpp
+#      #       ../../../boost/date_time/tz_db_base.hpp
+#      #       ../../../boost/date_time/dst_transition_generators.hpp
+#      ]
+#      ] ;
+
+local gregorian_files = [ set.difference
+       [ glob ../../../boost/date_time/gregorian/*.hpp ] :
+       [ glob ../../../boost/date_time/gregorian/event_schedule.hpp ]
+       ] ;
+
+#ECHO $(date_time_files) ; # useful for debugging
+
+# to build the autodoc files, run bjam --v2 autodoc_target. copy generated
+# file from bin.v2 dir to here. run ref_tag_fix.pl.
+
+doxygen date_time_autodoc :
+       $(date_time_files) :
+        <doxygen:param>ENABLE_PREPROCESSING=NO
+        <xsl:param>boost.doxygen.reftitle="Date Time Reference"
+        <doxygen.doxproc.title>"Date Time Reference"
+        <doxygen.doxproc.id>"date_time_reference"
+       ;
+
+doxygen gregorian_autodoc :
+       $(gregorian_files) :
+        <doxygen:param>ENABLE_PREPROCESSING=NO
+        <xsl:param>boost.doxygen.reftitle="Gregorian Reference"
+        <doxygen.doxproc.title>"Gregorian Reference"
+        <doxygen.doxproc.id>"gregorian_reference"
+       ;
+
+doxygen posix_time_autodoc :
+       [ glob ../../../boost/date_time/posix_time/*.hpp ] :
+        <doxygen:param>ENABLE_PREPROCESSING=NO
+        <xsl:param>boost.doxygen.reftitle="Posix Time Reference"
+        <doxygen.doxproc.title>"Posix Time Reference"
+        <doxygen.doxproc.id>"posix_time_reference"
+       ;
+
+doxygen local_time_autodoc :
+        [ glob ../../../boost/date_time/local_time/*.hpp ] :
+        <doxygen:param>ENABLE_PREPROCESSING=NO
+        <xsl:param>boost.doxygen.reftitle="Local Time Reference"
+        <doxygen.doxproc.title>"Local Time Reference"
+        <doxygen.doxproc.id>"local_time_reference"
+        ;
+
+
+# Copyright (c) 2004
+# CrystalClear Software, Inc.
+#
+# 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 appear in all copies and
+# that both that copyright notice and this permission notice appear
+# in supporting documentation.  CrystalClear Software makes no
+# representations about the suitability of this software for any
+# purpose.  It is provided "as is" without express or implied warranty.
=======================================
--- /dev/null
+++ /trunk/libs/date_time/xmldoc/README Mon Dec 28 23:05:14 2009
@@ -0,0 +1,38 @@
+I couldn't get the date_time.xml to validate, however, it works anyway.
+The build process with fail with adequate error messages to fix
+any errors.
+
+/********************************/
+Do not place a dtd declaration in the doc xml files.
+Begin each file with:
+<section ...
+
+/********************************/
+Including files into sections has some quirks to it. Unless there is a
+section in the parent file, the first included file will display
+instead of link.
+
+Example.
+In date_time.xml:
+
+  <xi:include href="subsection.xml" />
+
+And in subsection/xml:
+  <section id="date_time.my_subsection"
+     xmlns:xi="http://www.w3.org/2001/XInclude";>
+     <para>
+       ...
+     </para>
+     <xi:include href="another.xml" />
+
+/********************************/
+To crosslink use:
+<link linkend="date_time.section.subsection">optional text</link>
+
+If you use '<link linkend="top">top</link>' the link will automatically
+go to the top of the page it ends up in.
+
+# Copyright (c) 2002-2006 CrystalClear Software, Inc.
+# Use, modification and distribution is subject to the
+# Boost Software License, Version 1.0. (See accompanying
+# file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
=======================================
--- /dev/null
+++ /trunk/libs/date_time/xmldoc/acknowledgements.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"../../../tools/boostbook/dtd/boostbook.dtd">
+
+<!-- Copyright (c) 2001-2004 CrystalClear Software, Inc.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<section id="date_time.acknowledgements">
+  <title>Acknowledgements</title>
+
+  <para>
+ Many people have contributed to the development of this library. In particular Hugo Duncan and Joel de Guzman for help with porting to various compilers. For initial development of concepts and design Corwin Joy and Michael Kenniston deserve special thanks. Also extra thanks to Michael for writing up the theory and tradeoffs part of the documentation. Dave Zumbro for initial inspiration and sage thoughts. Many thanks to boost reviewers and users including: William Seymour, Kjell Elster, Beman Dawes, Gary Powell, Andrew Maclean, William Kempf, Peter Dimov, Chris Little, David Moore, Darin Adler, Gennadiy Rozental, Joachim Achtzehnter, Paul Bristow, Jan Langer, Mark Rodgers, Glen Knowles, Matthew Denman, and George Heintzelman.
+  </para>
+</section>
=======================================
--- /dev/null
+++ /trunk/libs/date_time/xmldoc/buildinfo.xml  Mon Dec 28 23:05:14 2009
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"../../../tools/boostbook/dtd/boostbook.dtd">
+
+<!-- Copyright (c) 2001-2004 CrystalClear Software, Inc.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<section id="date_time.buildinfo">
+  <title>Build-Compiler Information</title>
+
+  <para>
+    <link linkend="overview">Overview</link> --
+    <link linkend="compile_options">Compilation Options</link> --
+    <link linkend="portability">Compiler/Portability Notes</link> --
+    <link linkend="dir_structure">Directory Structure</link> --
+    <link linkend="other_boost_libs">Required Boost Libraries</link>
+  </para>
+
+  <anchor id="overview" />
+  <bridgehead renderas="sect3">Overview</bridgehead>
+  <para>
+ The library has a few functions that require the creation of a library file (mostly to_string, from_string functions). Most library users can make effective use of the library WITHOUT building the library, but simply including the required headers. If the library is needed, the Jamfile in the build directory will produce a "static" library (libboost_date_time) and a "dynamic/shared" library (boost_date_time) that contains these functions.
+  </para>
+
+  <anchor id="compile_options" />
+  <bridgehead renderas="sect3">Compilation Options</bridgehead>
+  <para>
+ By default the posix_time system uses a single 64 bit integer internally to provide a microsecond level resolution. As an alternative, a combination of a 64 bit integer and a 32 bit integer (96 bit resolution) can be used to provide nano-second level resolutions. The default implementation may provide better performance and more compact memory usage for many applications that do not require nano-second resolutions.
+  </para>
+  <para>
+ To use the alternate resolution (96 bit nanosecond) the variable <code>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG</code> must be defined in the library users project files (ie Makefile, Jamfile, etc). This macro is not used by the Gregorian system and therefore has no effect when building the library.
+  </para>
+ <para>As of version 1.33, the date_time library introduced a new IO streaming system. Some compilers are not capable of utilizing this new system. For those compilers the earlier ("legacy") IO system is still available. Non-supported compilers will select the legacy system automatically but the user can force the usage of the legacy system by defining <code>USE_DATE_TIME_PRE_1_33_FACET_IO</code>.</para>
+
+ <para>As a convenience, <code>date_time</code> has provided some <link linkend="additional_duration_types">additional duration types</link>. Use of these types may have unexpected results due to the snap-to-end-of-month behavior (see <link linkend="snap_to_details">Reversibility of Operations Pitfall</link> for complete details and examples). These types are enabled by default. To disable these types, simply undefine <code>BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES</code> in your project file.</para>
+
+ <para>Another convenience is the default constructors for <code><link linkend="date_time.gregorian.date_class">date</link></code>, and <code><link linkend="date_time.posix_time.ptime_class">ptime</link></code>. These constructors are enabled by default. To disable them, simply define <code>DATE_TIME_NO_DEFAULT_CONSTRUCTOR</code> in your project file.</para>
+
+  <anchor id="portability" />
+  <bridgehead renderas="sect3">Compiler/Portability Notes</bridgehead>
+  <para>
+ The Boost Date-Time library has been built and tested with many compilers and platforms. However, some compilers and standard libraries have issues. While some of these issues can be worked around, others are difficult to work around. The following compilers are known to fully support all aspects of the library:
+    <itemizedlist mark="bullet">
+      <listitem>Codewarrior 9.4 Windows</listitem>
+      <listitem>GCC 3.2 - 3.4, 4.x on Linux</listitem>
+      <listitem>GCC 3.3, 4.x on Darwin</listitem>
+      <listitem>GCC 3.3 - 3.4, 4.x on Solaris</listitem>
+      <listitem>GCC 3.3, 4.x  on HP-UX</listitem>
+      <listitem>QCC 3.3.5 on QNX</listitem>
+      <listitem>MSVC 7.1 Windows </listitem>
+      <listitem>Intel 8.1-9.x Linux and Windows</listitem>
+    </itemizedlist>
+  </para>
+
+  <para>
+     Unfortunately, the VC8 compiler has some issues with date-time code.
+     The most serious issue is a memory leak which was introduced into the
+ VC8 standard library basic_stream code. Date-time has code has been changed + to avoid this as much as possible, but if you are using the legacy IO option
+     (NOT the default with VC8) then the issue can still arise.  See the
+
+ <ulink url="http://lists.boost.org/Archives/boost/2006/02/101122.php";>mailing list archive</ulink> for more details.
+  </para>
+
+  <para>
+ In addition to the problem above, some versions of the VC8 library have limited
+     the range of allowed
+ values in the <code>std::tm</code> structure to positive values. This was a new + restriction added in the VC8. The effect is that dates prior to the year + 1900 will cause exceptions. There is, unfortunately, no easy workaround for
+     this issue.  Note that the new 64bit version of the VC8 compiler
+     does not appear to have this limitation.
+  </para>
+
+  <para>
+ These compilers support all aspects of the library except <code>wstring/wstream</code>
+    output.
+    <itemizedlist mark="bullet">
+      <listitem>MinGW 3.2, 3.4, 3.5 *</listitem>
+      <listitem>GCC 3.2 (cygwin) *</listitem>
+    </itemizedlist>
+  </para>
+
+  <para>
+ In particular, a lack of support for standard locales limits the ability of the library to support iostream based input output. For these compilers a set of more limited string based input-output is provided. Some compilers/standard libraries with this limitation include:
+    <itemizedlist mark="bullet">
+      <listitem>Borland 5.6</listitem>
+    </itemizedlist>
+  </para>
+
+  <para>
+ Official support for some older compilers has now been dropped. This includes:
+    <itemizedlist mark="bullet">
+      <listitem>GCC 2.9x</listitem>
+      <listitem>Borland 5.1.1</listitem>
+      <listitem>MSVC 7.0 and 6 SP5 </listitem>
+    </itemizedlist>
+  </para>
+
+  <bridgehead renderas="sect5">Visual Studio &amp; STLPort</bridgehead>
+ <para>There is a known issue with Visual Studio (7.0 &amp; 7.1) and STLPort. The build errors typically make reference to a type issue or 'no acceptable conversion' and are attempting to instantiate a template with <code>wchar_t</code>. The default build of STLPort does not support <code>wchar_t</code>. There are two possible workarounds for this issue. The simplest is the user can build date_time with no wide stream/string etc. The other is to rebuild STLPort with wchar_t support.
+  </para>
+ <para>To build date_time with no wide stream/string etc, execute the following command from <code>$BOOST_ROOT</code>:
+    <screen>bjam -a "-sTOOLS=vc-7_1-stlport" "-sSTLPORT_PATH=..." \
+     "-sBUILD=&lt;define>BOOST_NO_STD_WSTRING"           \
+     --stagedir=... --with-date_time stage</screen>
+ (replace the ellipsis with the correct paths for the build system and adjust the <code>TOOLS</code> to the proper toolset if necessary)
+  </para>
+ <para>Rebuilding STLPort with <code>wchar_t</code> support involves placing <code>/Zc:wchar_t</code> in the STLPort makefile. Date_time should then be built with the following command from <code>$BOOST_ROOT</code>:
+    <screen>bjam -a "-sTOOLS=vc-7_1-stlport" "-sSTLPORT_PATH=..." \
+     "-sBUILD=&amp;native-wchar_t>on"                     \
+     --stagedir=... --with-date_time stage</screen>
+ (replace the ellipsis with the correct paths for the build system and adjust the <code>TOOLS</code> to the proper toolset if necessary)
+  </para>
+
+  <anchor id="dir_structure" />
+  <bridgehead renderas="sect3">Directory Structure</bridgehead>
+  <para>
+    The directory tree has the following structure:
+ <programlisting>/boost/date_time -- common headers and template code
+/boost/date_time/gregorian          -- Gregorian date system header files
+/boost/date_time/posix_time         -- Posix time system headers
+/boost/date_time/local_time         -- Local time system headers
+/libs/date_time/build               -- build files and output directory
+/libs/date_time/test                -- test battery for generic code
+/libs/date_time/test/gregorian -- test battery for the Gregorian system +/libs/date_time/test/posix_time -- test battery for the posix_time system +/libs/date_time/test/local_time -- test battery for the local_time system
+/libs/date_time/examples/gregorian  -- example programs for dates
+/libs/date_time/examples/posix_time -- time example programs
+/libs/date_time/examples/local_time -- nifty example programs
+/libs/date_time/src/gregorian       -- cpp files for libboost_date_time
+/libs/date_time/src/posix_time -- empty (one file, but no source code...)</programlisting>
+  </para>
+
+  <anchor id="other_boost_libs" />
+  <bridgehead renderas="sect3">Required Boost Libraries</bridgehead>
+  <para>
+ Various parts of date-time depend on other boost libraries. These include:
+    <itemizedlist mark="bullet">
+ <listitem><ulink url="../../libs/tokenizer/index.html">boost.tokenizer</ulink> </listitem> + <listitem><ulink url="../../libs/integer/cstdint.htm">boost.integer(cstdint)</ulink> </listitem> + <listitem><ulink url="../../libs/utility/operators.htm">boost.operators</ulink> </listitem> + <listitem><ulink url="../../libs/conversion/lexical_cast.htm">boost.lexical_cast </ulink> </listitem> + <listitem><ulink url="../../libs/smart_ptr/smart_ptr.htm">boost.smart_ptr (local time only)</ulink> </listitem> + <listitem><ulink url="../../libs/algorithm/string/">boost::string_algorithms </ulink> </listitem> + <listitem><ulink url="../../libs/serialization/index.html">boost::serialize (serialization code only) </ulink> </listitem>
+    </itemizedlist>
+    so these libraries need to be installed.
+  </para>
+</section>
=======================================
--- /dev/null
+++ /trunk/libs/date_time/xmldoc/calculations.xml       Mon Dec 28 23:05:14 2009
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"../../../tools/boostbook/dtd/boostbook.dtd">
+
+<!-- Copyright (c) 2001-2004 CrystalClear Software, Inc.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<section id="date_time.calculations">
+  <title>Calculations</title>
+
+  <para>
+    <link linkend="timepoints">Timepoints</link> --
+    <link linkend="durations">Durations</link> --
+    <link linkend="intervals">Intervals (Periods)</link> --
+    <link linkend="special_value_handling">Special Value Handling</link>
+  </para>
+  <anchor id="timepoints" />
+  <bridgehead renderas="sect3">Timepoints</bridgehead>
+  <para>
+ This section describes some of basic arithmetic rules that can be performed with timepoints. In general, Timepoints support basic arithmetic in conjunction with Durations as follows:
+    <programlisting>
+      Timepoint + Duration  --> Timepoint
+      Timepoint - Duration  --> Timepoint
+      Timepoint - Timepoint --> Duration
+    </programlisting>
+    Unlike regular numeric types, the following operations are undefined:
+    <programlisting>
+      Duration + Timepoint  --> Undefined
+      Duration - Timepoint  --> Undefined
+      Timepoint + Timepoint --> Undefined
+    </programlisting>
+  </para>
+  <anchor id="durations" />
+  <bridgehead renderas="sect3">Durations</bridgehead>
+  <para>
+ Durations represent a length of time and can have positive and negative values. It is frequently useful to be able to perform calculations with other durations and with simple integral values. The following describes these calculations:
+    <programlisting>
+      Duration + Duration  --> Duration
+      Duration - Duration  --> Duration
+
+      Duration * Integer   --> Duration
+      Integer  * Duration  --> Duration
+      Duration / Integer   --> Duration  (Integer Division rules)
+    </programlisting>
+  </para>
+  <anchor id="intervals" />
+  <bridgehead renderas="sect3">Intervals (Periods)</bridgehead>
+  <para>
+ Interval logic is extremely useful for simplifying many 'calculations' for dates and times. The following describes the operations provided by periods which are based on half-open range. The following operations calculate new time periods based on two input time periods:
+    <programlisting>
+Timeperiod intersection Timeperiod --> Timeperiod
+  (null interval if no intersection)
+Timeperiod merge Timeperiod        --> Timeperiod
+  (null interval if no intersection)
+Timeperiod shift Duration          --> Timeperiod
+  (shift start and end by duration amount)
+    </programlisting>
+ In addition, periods support various queries that calculate boolean results. The first set is caluculations with other time periods:
+    <programlisting>
+  Timeperiod == Timeperiod           --> bool
+ Timeperiod &lt; Timeperiod --> bool (true if lhs.last &lt;= rhs.begin)
+  Timeperiod intersects Timeperiod   --> bool
+  Timeperiod contains Timeperiod     --> bool
+  Timeperiod is_adjacent Timeperiod  --> bool
+    </programlisting>
+    The following calculations are performed versus the Timepoint.
+    <programlisting>
+  Timeperiod contains Timepoint      --> bool
+  Timeperiod is_before Timepoint     --> bool
+  Timeperiod is_after Timepoint      --> bool
+    </programlisting>
+  </para>
+  <anchor id="special_value_handling" />
+  <bridgehead renderas="sect3">Special Value Handling</bridgehead>
+  <para>
+ For many temporal problems it is useful for Duration and Timepoint types to support special values such as Not A Date Time (NADT) and infinity. In general special values such as Not A Date Time (NADT) and infinity should follow rules like floating point values. Note that it should be possible to configure NADT based systems to throw an exception instead of result in NADT.
+    <programlisting>
+  Timepoint(NADT) + Duration --> Timepoint(NADT)
+  Timepoint(&#8734;) + Duration    --> Timepoint(&#8734;)
+  Timepoint + Duration(&#8734;)    --> Timepoint(&#8734;)
+  Timepoint - Duration(&#8734;)    --> Timepoint(-&#8734;)
+    </programlisting>
+ When performing operations on both positive and negative infinities, the library will produce results consistent with the following.
+    <programlisting>
+  Timepoint(+&#8734;) + Duration(-&#8734;) --> NADT
+  Duration(+&#8734;) + Duration(-&#8734;)  --> NADT
+  Duration(&#177;&#8734;) * Zero          --> NADT
+
+  Duration(&#8734;) * Integer(Not Zero) --> Duration(&#8734;)
+  Duration(+&#8734;) * -Integer         --> Duration(-&#8734;)
+  Duration(&#8734;) / Integer           --> Duration(&#8734;)
+    </programlisting>
+  </para>
+</section>
=======================================
--- /dev/null
+++ /trunk/libs/date_time/xmldoc/changes.xml    Mon Dec 28 23:05:14 2009
@@ -0,0 +1,744 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"../../../tools/boostbook/dtd/boostbook.dtd">
+
+<!-- Copyright (c) 2001-2006 CrystalClear Software, Inc.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<section id="date_time.changes">
+  <title>Change History</title>
+
+ <!-- if each new change tgroup has a "Bug Fix" as the first "Type", the columns will line up nicely -->
+
+ <bridgehead renderas="sect3">Changes from Boost 1.38 to 1.40 (date_time 1.06 to 1.07)</bridgehead>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+        <row>
+          <entry>Type</entry>
+          <entry>Description</entry>
+        </row>
+      </thead>
+      <tbody>
+<!--
+        <row>
+          <entry>Feature</entry>
+          <entry>
+          </entry>
+        </row>
+-->
+
+        <row>
+          <entry>Bug fix</entry>
+          <entry>
+ Minor bug fixes (<ulink url="https://svn.boost.org/trac/boost/ticket/2809";>#2809</ulink>, + <ulink url="https://svn.boost.org/trac/boost/ticket/2824";>#2824</ulink>, + <ulink url="https://svn.boost.org/trac/boost/ticket/3015";>#3015</ulink>, + <ulink url="https://svn.boost.org/trac/boost/ticket/3105";>#3105</ulink> and others).
+          </entry>
+        </row>
+
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+ <bridgehead renderas="sect3">Changes from Boost 1.34 to 1.38 (date_time 1.05 to 1.06)</bridgehead>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+    <row>
+      <entry>Type</entry>
+      <entry>Description</entry>
+    </row>
+      </thead>
+      <tbody>
+        <row>
+          <entry>Feature</entry>
+          <entry>
+ Added support for formatting and reading time durations longer than 24 hours. + A new formatter <code>%O</code> is used indicate such long durations in the + format string. The old <code>%H</code> format specifier is thus restricted + to represent durations that fit into two characters, in order to retain support + for reading durations in ISO format. In case if it is detected that the <code>%H</code> + format specifier is used with longer durations, the results are not specified
+            (an assertion in debug builds is raised).
+          </entry>
+        </row>
+
+        <row>
+          <entry>Bug fix</entry>
+          <entry>
+ Added support for GCC 4.3. Several compilation issues were solved, as well as
+            compiler warnings were taken care of.
+          </entry>
+        </row>
+
+        <row>
+          <entry>Bug fix</entry>
+          <entry>
+ Added missing streaming operators for the <code>local_time_period</code> class.
+          </entry>
+        </row>
+
+        <row>
+          <entry>Bug fix</entry>
+          <entry>
+ Added several missing includes in different places. Some includes that are
+            not needed in some configurations were made conditional.
+          </entry>
+        </row>
+
+        <row>
+          <entry>Bug fix</entry>
+          <entry>
+ Solved compilation problem that was caused by not finding streaming operators + for <code>gregorian::date_duration</code> via ADL. The type is now made actually + a class rather a typedef for the <code>date_time::date_duration</code> template.
+            The similar change was done for <code>gregorian::weeks</code>.
+          </entry>
+        </row>
+
+        <row>
+          <entry>Bug fix</entry>
+          <entry>
+ Added a correctly spelled <code>date_time::hundredth</code> time resolution enum + value. The old one <code>date_time::hundreth</code> is considered deprecated and
+            to be removed in future releases.
+          </entry>
+        </row>
+
+        <row>
+          <entry>Bug fix</entry>
+          <entry>
+ Fixed compilation error in <code>format_date_parser.hpp</code> because of incorrect
+            stream type being used.
+          </entry>
+        </row>
+
+        <row>
+          <entry>Bug fix</entry>
+          <entry>
+ On Windows platform made inclusion of <code>windows.h</code> optional. The header is only used + when the <code>BOOST_USE_WINDOWS_H</code> macro is defined. Otherwise (and by default), + the library uses internal definitions of symbols from this header.
+          </entry>
+        </row>
+
+        <row>
+          <entry>Bug fix</entry>
+          <entry>
+ On Windows platform function <code>from_ftime</code> could return incorrect time if + the <code>FILETIME</code> that is being passed to the function contained dates before 1970-Jan-01.
+          </entry>
+        </row>
+
+        <row>
+          <entry>Bug fix</entry>
+          <entry>
+ Fixed a possible crash in <code>gregorian::special_value_from_string</code> if the string
+            did not represent a valid special value.
+          </entry>
+        </row>
+
+        <row>
+          <entry>Bug fix</entry>
+          <entry>
+ Removed the <code>testfrmwk.hpp</code> file from the public include directory. This file
+            was internal for the library tests and was not documented.
+          </entry>
+        </row>
+
+        <row>
+          <entry>Bug fix</entry>
+          <entry>
+            Fixed missing include in <code>filetime_functions.hpp</code>
+ (<ulink url="https://svn.boost.org/trac/boost/ticket/2688";>#2688</ulink>).
+          </entry>
+        </row>
+
+        <row>
+          <entry>Bug fix</entry>
+          <entry>
+ Fixed dereferencing end string iterators in different places of code,
+            which could cause crashes on MSVC
+ (<ulink url="https://svn.boost.org/trac/boost/ticket/2698";>#2698</ulink>).
+          </entry>
+        </row>
+
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+
+
+ <bridgehead renderas="sect3">Changes from Boost 1.33 to 1.34 (date_time 1.04 to 1.05)</bridgehead>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+       <row>
+         <entry>Type</entry>
+         <entry>Description</entry>
+       </row>
+      </thead>
+      <tbody>
+        <row>
+          <entry>Feature</entry>
+          <entry>
+ Updated the data in the date_time_zonespec.csv file to reflect new US/Canada + daylight savings time rules for 2007. If you upgrade to the new file, be aware + that the library will only give correct answers for current/future date + conversions. So if you are converting dates from earlier years the answers + will reflect current time zone rules not past rules. The library doesn't support
+             historic timezone rules presently.
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+          <entry>
+ Two other dst calculation features have also been update to reflect the new + US/Canada timzone rules. This is the boost::date_time::us_dst_rules and + dst_calc_engine. While the us_dst_rules is officially deprecated, a patch + by Graham Bennett has been applied which allows this class to work correctly + for both historical and future dates. The dst_calc_engine was updated to also + work for historical and future times. This allows the various local_adjustor + classes to work correctly. There was an interface change for classes using the + dst_calc_engine with custom dst traits classes. The traits classes signatures + changed to take a 'year' parameter on most of the methods such as end_month. + In addition, 2 new functions are needed on the traits classes: + <code>static date_type local_dst_start_day(year_type year)</code> and + <code>static date_type local_dst_end_day(year_type year)</code>. + Implementers should see <code>date_time/local_timezone_defs.hpp</code> for
+              examples.
+          </entry>
+        </row>
+
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>Fix DST traits for Austrialia (sf# 1672139) to set end of DST at 3:00 am instead of 2:00 am.
+          </entry>
+        </row>
+
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>Fix a problem with potential linking error with multiple definitions due
+                 to I/O code.
+          </entry>
+        </row>
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>Changed serialization code in both greg_serialize.hpp and time_serialize.hpp + to eliminate warnings due to unused variables for version and file_version.
+                 Thanks to Caleb Epstein for the patch suggestion.
+          </entry>
+        </row>
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>Fix regression errors that showed up under FreeBSD with GCC and the + LANG environment set to russian -- changed parser to use classic
+                 locale instead of blank locale.
+          </entry>
+        </row>
+
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>Changes for tracker issue 1178092 -- change in convert_to_lower to make
+                 local a const static and speed up parsing.
+          </entry>
+        </row>
+
+        <row>
+          <entry>Bug Fix</entry>
+          <entry>Patches from Ulrich Eckhardt to fix support for EVC++ 4.
+          </entry>
+        </row>
+
+        <row>
+          <entry>Feature</entry>
+ <entry>Reduce the usage of basic_stringstream as much a possible to work around
+                 a bug in the VC8 standard library. See
+ <ulink url="http://lists.boost.org/Archives/boost/2006/02/101122.php";>mailing list archive</ulink>
+                 for more information.
+          </entry>
+        </row>
+
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+
+ <bridgehead renderas="sect3">Changes from Boost 1.32 to 1.33 (date_time 1.03 to 1.04)</bridgehead>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+       <row>
+         <entry>Type</entry>
+         <entry>Description</entry>
+       </row>
+      </thead>
+      <tbody>
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>Period lengths, when beginning and end points are the same, or are consecutive, were being incorrectly calculated. The corrected behavior, where end and beginning points are equal, or a period is created with a zero duration, now return a length of zero. A period where beginning and end points are consecutive will return a length of one.
+          </entry>
+        </row>
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>Time_input_facet was missing functions to set iso formats. It also failed to parse time values that did not use a separator (%H%M%S). Both these bugs have been corrected.
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>Preliminary names of ptime_facet and ptime_input_facet changed to simply time_facet and time_input_facet. The ptime_* versions have been removed all together.
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>The from_iso_string function failed to parse fractional digits. We added code that correctly parses when input has more digits, or too few digits, that the compiled library precision. Ptimes with only a decimal are also correctly parsed.
+          </entry>
+        </row>
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>The parsing mechanism in the new IO would consume the next character after a match was made. This bug presented itself when attempting to parse a period that had special value for it's beginning point.
+          </entry>
+        </row>
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>The new IO system failed to provide the ability for the user to "turn on" exceptions on the stream. The failbit was also not set when parsing failed. Both of these problems have been fixed.
+          </entry>
+        </row>
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>Parsing of special values, by means of from_*_string functions, has been fixed. This also effects the libraries ability to serialize special values. Time_duration now serializes as either a string or individual fields (depending on is_special()).
+          </entry>
+        </row>
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>Previously, output streaming of <code>partial_date</code> would display the day as either a single or double digit integer (ie '1', or '12'). This has been corrected to always display a double digit integer (ie '01').
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+          <entry>Major new features related to management of local times.
+ This includes the introduction of a series of new classes to + represent time zones and local times (see <link linkend="date_time.local_time">Date Time Local Time</link> for complete details).
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>Input and output facets have been re-written to support format-based + redefinition of formats (see <link linkend="date_time.date_time_io">Date Time IO</link> for complete details).
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>Functions have been added to facilitate conversions between <code>tm</code> structs for <code>date</code>, <code>ptime</code>, <code>time_duration</code>, and <code>local_date_time</code>. Functions for converting <code>FILETIME</code>, and <code>time_t</code> to <code>ptime</code> are also provided. See the individual sections for details.
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>A <code>universal_time</code> function has been added to the <code>microsec_time_clock</code> (full details of this function can be found <link linkend="ptime_from_clock">here</link>).
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>Functions have been added to facilitate conversions between <code>tm</code> structs for <code>date</code>, <code>ptime</code>, <code>time_duration</code>, and <code>local_date_time</code>. Functions for converting <code>FILETIME</code>, and <code>time_t</code> to <code>ptime</code> are also provided. See the individual sections for details.
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>A <code>universal_time</code> function has been added to the <code>microsec_time_clock</code> (full details of this function can be found <link linkend="ptime_from_clock">here</link>).
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>Date-time now uses reentrant POSIX functions on those platforms that
+                 support them when BOOST_HAS_THREADS is defined.
+          </entry>
+        </row>
+        <row>
+          <entry>Bug Fix</entry>
+          <entry>Fixed a bug in serialization code where special values
+                (not-a-date-time, infinities, etc) for
+ ptime, time_duration would not read back correctly from an archive.
+                The output serialization code wrote subfields such
+ as time_duration.seconds() which are invalid for special values and + thus undefined values. Thus when read back the values could cause
+                strange behavior including execeptions on construction.
+          </entry>
+        </row>
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>Fixed multiple warnings generated with various platforms/compilers.
+          </entry>
+        </row>
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>Construction of a ptime with a time_duration beyond the range of 00:00 to 23:59:59.9... now adjusts the date and time to make the time_duration fall within this range (ie <code>ptime(date(2005,2,1), hours(-5))</code> -> "2005-Jan-31 19:00:00" &amp; <code>ptime(date(2005,2,1), hours(35))</code> -> "2005-Feb-02 11:00:00").
+          </entry>
+        </row>
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>Time parsing now correctly handles excessive digits for fractional seconds. Leading zeros are dropped ("000100" -> 100 frac_sec), and excessive digits are truncated at the proper place ("123456789876" -> 123456 or 123456789 depending on what precision the library was compiled with).
+          </entry>
+        </row>
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>Changes to the <code>boost::serialization</code> interface broke serialization compatibility for <code>date_time</code>. The user must provide a function to insure <code>date_time</code> objects are <code>const</code> before they are serialized. The function should be similar to:
+            <screen>template&lt;class archive_type, class temporal_type>
+void save_to(archive_type&amp; ar,
+             const temporal_type&amp; tt)
+{
+  ar &lt;&lt; tt;
+}</screen>
+          </entry>
+        </row>
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>Use of the depricated <code>boost::tokenizer</code> interface has been updated to the current interface. This fixes compiler errors on some older compilers.
+          </entry>
+        </row>
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>Templatized formatters in the legacy IO system to accept char type. Also removed calls to <code>boost::lexical_cast</code>.
+          </entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+
+ <bridgehead renderas="sect3">Changes from Boost 1.31 to 1.32 (date_time 1.02 to 1.03)</bridgehead>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+       <row>
+         <entry>Type</entry>
+         <entry>Description</entry>
+       </row>
+      </thead>
+      <tbody>
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>Snap to end of month behavior corrected for year_functor. Previously, starting + from 2000-Feb-28 (leap year and not end of month) and iterating through the next + leap year would result in 2004-Feb-29 instead of 2004-Feb-28. This behavior has + been corrected to produce the correct result of 2004-Feb-28. Thanks to Bart Garst
+                 for this change.
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>Free function for creating a ptime object from a FILETIME struct. This function + is only available on platforms that define BOOST_HAS_FTIME.
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>Microsecond time clock is now available on most windows compilers as well as
+                 Unix.
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>Use of the boost::serialization library is now available with most of the + date_time classes. Classes capable of serialization are: date_generator classes, + date, days, date_period, greg_month, greg_weekday, greg_day, ptime, time_duration,
+                 and time_period. Thanks to Bart Garst for this change.
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>Functions added to convert date and time classes to wstring. The library now + provides to_*_wstring as well as to_*_string functions for: simple, iso, + iso_extended, and sql for dates and compilers that support wstrings. Thanks to
+                 Bart Garst for this change.
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>Period classes now handle zero length and NULL periods correctly. A NULL period + is a period with a negative length. Thanks to Frank Wolf and Bart Garst for this
+                 change.
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>Added end_of_month function to gregorian::date to return the last day of + the current month represented by the date. Result is undefined for
+                 not_a_date_time or infinities.
+          </entry>
+        </row>
+        <row>
+          <entry>Bug Fix</entry>
+ <entry>Removed incorrect usage of BOOST_NO_CWCHAR macro throughout library.
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>New names added for some date classes. Original names are still valid but may
+                 some day be deprecated. Changes are:
+            <simplelist type='horiz' columns='3'>
+              <member>date_duration</member>
+              <member>is now</member>
+              <member>days</member>
+              <member>nth_kday_of_month</member>
+              <member>is now</member>
+              <member>nth_day_of_the_week_in_month</member>
+              <member>first_kday_of_month</member>
+              <member>is now</member>
+              <member>first_day_of_the_week_in_month</member>
+              <member>last_kday_of_month</member>
+              <member>is now</member>
+              <member>last_day_of_the_week_in_month</member>
+              <member>first_kday_after</member>
+              <member>is now</member>
+              <member>first_day_of_the_week_after</member>
+              <member>first_kday_before</member>
+              <member>is now</member>
+              <member>first_day_of_the_week_before</member>
+            </simplelist>
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>Free functions for date generators added. Functions are: days_until_weekday, days_before_weekday, next_weekday, and previous_weekday.
+            <screen>days days_until_weekday(date, greg_weekday);
+days days_before_weekday(date, greg_weekday);
+date next_weekday(date, greg_weekday);
+date previous_weekday(date, greg_weekday);</screen>
+           Thanks to Bart Garst for this change.
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>New experimental duration types added for months, years, and weeks. These classes + also provide mathematical operators for use with date and time classes. Be aware + that adding of months or years a time or date past the 28th of a month may show + non-normal mathematical properties. This is a result of 'end-of-month' + snapping used in the calculation. The last example below illustrates the
+                 issue.
+
+            <screen>months m(12);
+years y(1);
+m == y; // true
+days d(7);
+weeks w(1);
+d == w; // true
+ptime t(...);
+t += months(3);
+date d(2004,Jan,30);
+d += months(1); //2004-Feb-29
+d -= months(1); //2004-Jan-29</screen>
+            Input  streaming is not yet implemented for these types.
+           Thanks to Bart Garst for this change.
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>Unifying base class for date_generators brought in to gregorian namespace. See <link linkend="date_time.examples.print_holidays">Print Holidays Example</link>.
+          </entry>
+        </row>
+        <row>
+          <entry>Feature</entry>
+ <entry>Added constructors for date and ptime that allow for default construction (both) + and special values construction (ptime, both now support this). Default + constructors initialize the objects to not_a_date_time (NADT).
+                 <screen>ptime p_nadt(not_a_date_time);
+ptime p_posinf(pos_infin);
+ptime p; // p == NADT
+date d;  // d == NADT</screen>
+           Thanks to Bart Garst for this change.
+          </entry>
+        </row>
+       <row>
+         <entry>Feature</entry>
+ <entry>Output streaming now supports wide stream output on compiler / standard library combinations that support wide streams. This allows code like:
+           <screen>std::wstringstream wss;
+date d(2003,Aug,21);
+wss &lt;&lt; d;</screen>
+           Thanks to Bart Garst for this change.
+         </entry>
+       </row>
+       <row>
+         <entry>Feature</entry>
+ <entry>Input streaming for date and time types is now supported on both wide and narrow streams:
+           <screen>date d(not_a_date_time);
+std::stringstream ss("2000-FEB-29");
+ss &gt;&gt; d; //Feb 29th, 2000
+std::wstringstream ws("2000-FEB-29");
+ws &gt;&gt; d; //Feb 29th, 2000</screen>
+           Thanks to Bart Garst for this change.
+         </entry>
+       </row>
+       <row>
+         <entry>Bug Fix</entry>
+ <entry> Fixed bug in duration_from_string() where a string formatted with + less than full amount of fractional digits created an incorrect + time_duration. With microsecond resolution for time durations
+                  the string "1:01:01.010" created a time duration of
+                  01:01:01.000010 instead of 01:01:01.010000
+          </entry>
+       </row>
+       <row>
+         <entry>Bug Fix</entry>
+ <entry>Fixed the special value constructor for gregorian::date and posix_time::ptime + when constructing with min_date_time or max_date_time. The wrong value was
+                 constructed for these.
+          </entry>
+       </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+ <bridgehead renderas="sect3">Changes from Boost 1.30 to 1.31 (date_time 1.01 to 1.02)</bridgehead>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+       <row>
+         <entry>Type</entry>
+         <entry>Description</entry>
+       </row>
+      </thead>
+      <tbody>
+       <row>
+         <entry>Bug Fix</entry>
+ <entry>Build configuration updated so dll, statically, and dynamically linkable library files are now produced with MSVC compilers. See <link linkend="date_time.buildinfo">Build/Compiler Information</link> for more details.</entry>
+       </row>
+       <row>
+         <entry>Bug Fix</entry>
+ <entry>Time_duration from_string is now correctly constructed from a negative value. (ie "-0:39:00.000") Code provided by Bart Garst.</entry>
+       </row>
+       <row>
+         <entry>Bug Fix</entry>
+ <entry>Fixed many MSVC compiler warnings when compiled with warning level 4.</entry>
+       </row>
+       <row>
+         <entry>Feature</entry>
+ <entry>Added prefix decrement operator (--) for date and time iterators. See <link linkend="date_time.posix_time.time_iterators">Time Iterators</link> and <link linkend="date_time.gregorian.date_iterators">Date Iterators</link> for more details. Code provided by Bart Garst.</entry>
+       </row>
+       <row>
+         <entry>Feature</entry>
+ <entry>Special_values functionality added for date_duration, time_duration and time classes. Code provided by Bart Garst.</entry>
+       </row>
+       <row>
+         <entry>Bug Fix</entry>
+ <entry>Fixed time_duration_traits calculation bug which was causing time duration to be limited to 32bit range even when 64 bits were available. Thanks to Joe de Guzman for tracking this down.</entry>
+       </row>
+       <row>
+         <entry>Bug Fix</entry>
+ <entry>Provided additional operators for duration types (eg: date_duration, time_duration). This includes dividable by integer and fixes to allow +=, -= operators. Thanks to Bart Garst for writing this code. Also, the documentation of <link linkend="date_time.calculations">Calculations</link> has been improved.</entry>
+       </row>
+       <row>
+         <entry>Bug Fix</entry>
+ <entry>Added typedefs to boost::gregorian gregorian_types.hpp various date_generator function classes.</entry>
+       </row>
+       <row>
+         <entry>Feature</entry>
+         <entry>Added from_time_t function to convert time_t to a 
ptime.</entry>
+       </row>
+       <row>
+         <entry>Feature</entry>
+ <entry>Added a span function for combining periods. See <link linkend="date_time.gregorian.date_period">date period</link> and <link linkend="date_time.posix_time.time_period">time period</link> docs.</entry>
+       </row>
+       <row>
+         <entry>Feature</entry>
+ <entry>Added a function to time_duration to get the total number of seconds in a + duration truncating any fractional seconds. In addition, other resolutions
+                 were added to allow for easy conversions. For example
+           <screen>seconds(1).total_milliseconds() == 1000
+seconds(1).total_microseconds() == 1000000
+hours(1).total_milliseconds() == 3600*1000 //3600 sec/hour
+seconds(1).total_nanoseconds() == 1000000000</screen>
+
+           </entry>
+       </row>
+       <row>
+         <entry>Feature</entry>
+ <entry>Added output streaming operators for the <link linkend="date_time.gregorian.date_algorithms">date generator</link> classes - partial_date, first_kday_after, first_kday_before, etc. Thanks to Bart Garst for this work.</entry>
+       </row>
+       <row>
+         <entry>Feature</entry>
+ <entry>Added unary- operators for durations for reversing the sign of a time duration. For example:
+           <screen>time_duration td(5,0,0); //5 hours
+td = -td; //-5 hours</screen>
+         Thanks to Bart Garst for this work.</entry>
+       </row>
+       <row>
+         <entry>Feature</entry>
+ <entry>Added support for parsing strings with 'month names'. Thus creating a date object from string now accepts multiple formats ("2003-10-31","2003-Oct-31", and "2003-October-31"). Thus, date d = from_simple_string("2003-Feb-27") is now allowed. A bad month name string ( from_simple_string("2003-SomeBogusMonthName-27")) will cause a bad_month exception. On most compilers the string compare is case insensitive. Thanks to Bart Garst for this work.</entry>
+       </row>
+       <row>
+         <entry>Feature</entry>
+ <entry>In addition to support for month names or numbers, functions have been added to create date objects from multi-ordered date strings. Ex: "January-21-2002", "2002-Jan-21", and "21-Jan-2003". See <link linkend="date_time.gregorian.date_class">Date Class</link> for more details.</entry>
+       </row>
+       <row>
+         <entry>Bug-Fix</entry><!-- leave '-' so table cell doesn't wrap -->
+ <entry>Various documentation fixes. Thanks to Bart Garst for updates.</entry>
+       </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+ <bridgehead renderas="sect3">Changes from Boost 1.29 to 1.30 (date_time 1.00 to 1.01)</bridgehead>
+  <para>
+ Notice: The interface to the partial_date class (see <link linkend="date_time.gregorian.date_algorithms">date_algorithms</link>) was changed. The order of construction parameters was changed which will cause some code to fail execution. This change was made to facilitate more generic local time adjustment code. Thus instead of specifying partial_date pd(Dec,25) the code needs to be changed to partial_date pd(25, Dec);
+  </para>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+       <row>
+         <entry>Type</entry>
+         <entry>Description</entry>
+       </row>
+      </thead>
+      <tbody>
+       <row>
+         <entry>Bug Fix</entry>
+ <entry>Added new experimental feature for Daylight Savings Time calculations. This allows traits based specification of dst rules.</entry>
+       </row>
+       <row>
+         <entry>Feature</entry>
+ <entry>Added new interfaces to calculate julian day and modified julian day to the gregorian date class. See <link linkend="date_time.gregorian.date_class">boost::gregorian::date</link>.</entry>
+       </row>
+       <row>
+         <entry>Feature</entry>
+ <entry>Add new interface to calculate iso 8601 week number for a date. See <link linkend="date_time.gregorian.date_class">boost::gregorian::date</link>.</entry>
+       </row>
+       <row>
+         <entry>Feature</entry>
+ <entry>Add an iso 8601 time date-time format (eg: YYYYMMDDTHHHMMSS) parsing function. See <link linkend="date_time.posix_time.ptime_class">Class ptime</link> for more information.</entry>
+       </row>
+       <row>
+         <entry>Feature</entry>
+ <entry> Added a length function to the period template so that both date_periods and time_periods will now support this function.</entry>
+       </row>
+       <row>
+         <entry>Bug Fix</entry>
+ <entry>Split Jamfiles so that libs/date_time/build/Jamfile only builds library and /libs/date_time/libs/test/Jamfile which runs tests.</entry>
+       </row>
+       <row>
+         <entry>Bug Fix</entry>
+         <entry>Fixed many minor documentation issues.</entry>
+       </row>
+       <row>
+         <entry>Bug Fix</entry>
+ <entry>Removed the DATE_TIME_INLINE macro which was causing link errors. This macro is no longer needed in projects using the library.</entry>
+       </row>
+       <row>
+         <entry>Bug Fix</entry>
+ <entry>Added missing typedef for year_iterator to gregorian_types.hpp</entry>
+       </row>
+       <row>
+         <entry>Bug Fix</entry>
+ <entry>Fixed problem with gregorian ostream operators that prevented the use of wide streams.</entry>
+       </row>
+       <row>
+         <entry>Bug-Fix</entry><!-- leave '-' so table cell doesn't wrap -->
+ <entry>Tighten error handling for dates so that date(2002, 2, 29) will throw a bad_day_of_month exception. Previously the date would be incorrectly constructed. Reported by sourceforge bug: 628054 among others.</entry>
+       </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+</section>
=======================================
--- /dev/null
+++ /trunk/libs/date_time/xmldoc/conceptual.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"../../../tools/boostbook/dtd/boostbook.dtd">
+
+<!-- Copyright (c) 2001-2005 CrystalClear Software, Inc.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<section id="date_time.conceptual" xmlns:xi="http://www.w3.org/2001/XInclude";>
+  <title>Conceptual</title>
+
+  <xi:include href="motivation.xml"/>
+  <xi:include href="domain_concepts.xml"/>
+  <xi:include href="design_concepts.xml"/>
+
+
+</section>
+
=======================================
--- /dev/null
+++ /trunk/libs/date_time/xmldoc/custom_time_zone.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,376 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"../../../tools/boostbook/dtd/boostbook.dtd">
+
+<!-- Copyright (c) 2001-2005 CrystalClear Software, Inc.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<section id="date_time.local_time.custom_time_zone">
+  <title>Custom Time Zone</title>
+
+  <link linkend="custom_time_zone_intro">Introduction</link> --
+  <link linkend="custom_time_zone_header">Header</link> --
+  <link linkend="custom_time_zone_constr">Construction</link> --
+  <link linkend="custom_time_zone_accessors">Accessors</link> --
+  <link linkend="custom_time_zone_dependents">Dependent Types</link>
+
+  <anchor id="custom_time_zone_intro" />
+  <bridgehead renderas="sect3">Introduction</bridgehead>
+  <para>
+ A custom_time_zone object is a set of data and rules that provide information about a time zone. Information such as the offset from UTC, it's name and abbreviation, as well as daylight savings rules, called <link linkend="date_time.local_time.dst_calc_rules">dst_calc_rules</link>. These rules are handled via a boost::shared_ptr&lt;dst_calc_rules&gt;. Not all time zones utilize daylight savings, therefore, time_zone objects can be used with a NULL-assigned shared_ptr.
+  </para>
+  <para>
+ As a convenience, a typedef for shared_ptr&lt;dst_calc_rules&gt; is provided. + <programlisting>typedef boost::shared_ptr&lt;dst_calc_rules&gt; local_time::dst_calc_rule_ptr;</programlisting>
+  </para>
+  <anchor id="date_time.local_time.custom_time_zone_ptr" />
+  <para>
+ The time_zone objects are used via a boost::shared_ptr&lt;local_time::time_zone&gt;. As a convenience, a typedef for boost::shared_ptr&lt;local_time::time_zone&gt; is provided: + <programlisting>typedef boost::shared_ptr&lt;time_zone&gt; local_time::time_zone_ptr;</programlisting>
+  </para>
+
+  <anchor id="custom_time_zone_header" />
+  <bridgehead renderas="sect3">Header</bridgehead>
+  <para>
+ The inclusion of a single header will bring in all boost::local_time types, functions, and IO operators. + <programlisting>#include "boost/date_time/local_time/local_time.hpp"</programlisting>
+  </para>
+
+  <anchor id="custom_time_zone_constr" />
+  <bridgehead renderas="sect3">Construction</bridgehead>
+  <para>
+    Construction of a custom_time_zone is dependent on four objects: a
+ <link linkend="date_time.posix_time.time_duration">time_duration</link>, a <link linkend="time_zone_names">time_zone_names</link>, a <link linkend="dst_adjustment_offsets">dst_adjustment_offsets</link>, and a shared_ptr to a <link linkend="date_time.local_time.dst_calc_rules">dst_calc_rule</link>.
+  </para>
+  <para>
+    <informaltable frame="all">
+      <tgroup cols="2">
+        <thead>
+          <row>
+            <entry>Syntax</entry>
+            <entry>Example</entry>
+          </row>
+        </thead>
+        <tbody>
+          <row>
+            <entry valign="top"><screen>custom_time_zone(...)
+  Parameters:
+    <link linkend="time_zone_names">names</link>,
+    <link linkend="date_time.posix_time.time_duration">gmt_offset</link>,
+    <link linkend="dst_adjustment_offsets">dst_offsets</link>,
+ <link linkend="date_time.local_time.dst_calc_rules">dst_rules</link> </screen></entry> + <entry>See <link linkend="date_time.examples.simple_time_zone">simple_time_zone</link> example for time_zone usage</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable>
+  </para>
+
+  <anchor id="custom_time_zone_accessors" />
+  <bridgehead renderas="sect3">Accessors</bridgehead>
+  <para>
+    <informaltable frame="all">
+      <tgroup cols="2">
+        <thead>
+          <row>
+            <entry valign="top" morerows="1">Syntax</entry>
+            <entry>Description</entry>
+          </row>
+          <row>
+            <entry>Example</entry>
+          </row>
+        </thead>
+        <tbody>
+          <row>
+ <entry valign="top" morerows="1"><screen>std::string dst_zone_abbrev()</screen></entry> + <entry>Returns the daylight savings abbreviation for the represented time zone.</entry>
+          </row>
+          <row>
+            <entry><screen>nyc_zone_sh_ptr->dst_zone_abbrev();
+// "EDT"</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>std::string std_zone_abbrev()</screen></entry> + <entry>Returns the standard abbreviation for the represented time zone.</entry>
+          </row>
+          <row>
+            <entry><screen>nyc_zone_sh_ptr->std_zone_abbrev();
+// "EST"</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>std::string dst_zone_name()</screen></entry> + <entry>Returns the daylight savings name for the represented time zone.</entry>
+          </row>
+          <row>
+            <entry><screen>nyc_zone_sh_ptr->dst_zone_name();
+// "Eastern Daylight Time"</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>std::string std_zone_name()</screen></entry> + <entry>Returns the standard name for the represented time zone.</entry>
+          </row>
+          <row>
+            <entry><screen>nyc_zone_sh_ptr->std_zone_name();
+// "Eastern Standard Time"</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>bool has_dst()</screen></entry> + <entry>Returns true when custom_time_zone's shared_ptr to dst_calc_rules is not NULL.</entry>
+          </row>
+          <row>
+            <entry><screen>nyc_zone_sh_ptr->has_dst();
+// true
+phx_zone_sh_ptr->has_dst();
+// false</screen>
+            </entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>dst_local_start_time(...)
+  Return Type:
+    ptime
+  Parameter:
+    greg_year</screen></entry>
+ <entry>The date and time daylight savings time begins in given year. Returns not_a_date_time if this zone has no daylight savings.</entry>
+          </row>
+          <row>
+            <entry><screen>nyc_ptr->dst_local_start_time(2004);
+// 2004-Apr-04 02:00</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>dst_local_end_time(...)
+  Return Type:
+    ptime
+  Parameter:
+    greg_year</screen></entry>
+ <entry>The date and time daylight savings time ends in given year. Returns not_a_date_time if this zone has no daylight savings.</entry>
+          </row>
+          <row>
+            <entry><screen>nyc_ptr->dst_local_end_time(2004);
+// 2004-Oct-31 02:00</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>time_duration base_utc_offset()</screen></entry> + <entry>The amount of time offset from UTC (typically in hours).</entry>
+          </row>
+          <row>
+            <entry><screen>nyc_ptr->base_utc_offset();
+// -05:00</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>time_duration dst_offset()</screen></entry> + <entry>The amount of time shifted during daylight savings.</entry>
+          </row>
+          <row>
+            <entry><screen>nyc_zone_sh_ptr->dst_offset();
+// 01:00</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>std::string to_posix_string()</screen></entry> + <entry>Returns a posix time zone string representation of this time_zone object. Depending on how the time_zone object was created, the date-spec format of the string will be in either 'M' notation or 'n' notation. Every possible date-spec that can be represented in 'J' notation can also be represented in 'n' notation. The reverse is not true so only 'n' notation is used for these types of date-specs. For a detailed description of a posix time zone string see <link linkend="date_time.local_time.posix_time_zone">posix_time_zone</link>.</entry>
+          </row>
+          <row>
+            <entry><screen>nyc_ptr->to_posix_string();
+// "EST-05EDT+01,M4.1.0/02:00,M10.5.0/02:00"
+phx_ptr->to_posix_string();
+// "MST-07"
+            </screen></entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable>
+  </para>
+
+  <anchor id="custom_time_zone_dependents" />
+  <bridgehead renderas="sect3">Dependent Types</bridgehead>
+  <link linkend="time_zone_names">Time Zone Names</link> --
+  <link linkend="dst_adjustment_offsets">Dst Adjustment Offsets</link> --
+ <link linkend="date_time.local_time.dst_calc_rules">Daylight Savings Calc Rules</link>
+  <anchor id="time_zone_names" />
+  <bridgehead renderas="sect3">Time Zone Names</bridgehead>
+  <para>
+ The time_zone_names_base type is an immutable template class of four strings. One each for the name and abbreviation in standard time and daylight savings time. The time_zone_names type is a typedef of time_zone_names_base&lt;char&gt;.
+  </para>
+  <para>
+    <informaltable frame="all">
+      <tgroup cols="2">
+        <thead>
+          <row>
+            <entry valign="top" morerows="1">Syntax</entry>
+            <entry>Description</entry>
+          </row>
+          <row>
+            <entry>Example</entry>
+          </row>
+        </thead>
+        <tbody>
+          <row>
+            <entry valign="top" morerows="1"><screen>time_zone_names(...)
+  Parameters:
+    string std_name
+    string std_abbrev
+    string dst_name
+    string dst_abbrev</screen></entry>
+ <entry>The only constructor, all four strings must be provided.</entry>
+          </row>
+          <row>
+            <entry><screen>string sn("Eastern Standard Time");
+string sa("EST");
+string dn("Eastern Daylight Time");
+string da("EDT");
+time_zone_names nyc_names(sn, sa,
+                          dn, da);</screen>
+            </entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>std::string std_zone_name()</screen></entry>
+            <entry>Returns the standard zone name</entry>
+          </row>
+          <row>
+            <entry><screen>nyc_names.std_zone_name();
+// "Eastern Standard Time"</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>std::string std_zone_abbrev()</screen></entry>
+            <entry>Returns the standard zone abbreviation</entry>
+          </row>
+          <row>
+            <entry><screen>nyc_names.std_zone_abbrev();
+// "EST"</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>std::string dst_zone_name()</screen></entry>
+            <entry>Returns the daylight savings zone name</entry>
+          </row>
+          <row>
+            <entry><screen>nyc_names.std_zone_name();
+// "Eastern Daylight Time"</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>std::string dst_zone_abbrev()</screen></entry>
+            <entry>Returns the daylight savings zone abbreviation</entry>
+          </row>
+          <row>
+            <entry><screen>nyc_names.std_zone_abbrev();
+// "EDT"</screen></entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable>
+  </para>
+
+  <anchor id="dst_adjustment_offsets" />
+  <bridgehead renderas="sect3">Dst Adjustment Offsets</bridgehead>
+  <para>
+ The dst_adjustment_offsets type is a collection of three <link linkend="date_time.posix_time.time_duration">time_duration</link> objects.
+  </para>
+  <para>
+    <informaltable frame="all">
+      <tgroup cols="2">
+        <thead>
+          <row>
+            <entry valign="top" morerows="1">Syntax</entry>
+            <entry>Description</entry>
+          </row>
+          <row>
+            <entry>Example</entry>
+          </row>
+        </thead>
+        <tbody>
+          <row>
+ <entry valign="top" morerows="1"><screen>dst_adjustment_offsets(...)
+  Parameters:
+    time_duration dst_adjust
+    time_duration start_offset
+    time_duration end_offset</screen></entry>
+ <entry>The first time_duration is the daylight savings adjustment. The second is the time which daylight savings starts on the start day. The third is the time daylight savings ends on the ending day.</entry>
+          </row>
+          <row>
+            <entry><screen>
+dst_adjustment_offsets(hours(1),
+                       hours(2),
+                       hours(2));</screen></entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable>
+  </para>
+
+  <anchor id="date_time.local_time.dst_calc_rules" />
+  <bridgehead renderas="sect3">Daylight Savings Calc Rules</bridgehead>
+  <para>
+ Daylight savings calc rules, named dst_calc_rules, are a series of objects that group appropriate <link linkend="date_time.gregorian.date_algorithms">date_generators</link> together to form rule sets. The individual rules objects are used via dst_calc_rule_ptr.
+  </para>
+  <para>
+ For a complete example of all five dst_calc_rule types, see: <link linkend="date_time.examples.calc_rules">calc_rules example</link>.
+  </para>
+  <para>
+    <informaltable frame="all">
+      <tgroup cols="2">
+        <thead>
+          <row>
+            <entry>Syntax</entry>
+            <entry>Description</entry>
+          </row>
+        </thead>
+        <tbody>
+          <row>
+            <entry valign="top"><screen>partial_date_dst_rule(...)
+  Parameters:
+    start_rule
+    end_rule</screen></entry>
+ <entry>Both the start and end rules are of type gregorian::partial_date.</entry>
+          </row>
+          <row>
+            <entry valign="top"><screen>first_last_dst_rule(...)
+  Parameters:
+    start_rule
+    end_rule</screen></entry>
+ <entry>The DST start rule is of type gregorian::first_day_of_the_week_in_month and the end rule is of type gregorian::last_day_of_the_week_in_month.</entry>
+          </row>
+          <row>
+            <entry valign="top"><screen>last_last_dst_rule(...)
+  Parameters:
+    start_rule
+    end_rule</screen></entry>
+ <entry>Both the start and end rules are of type gregorian::last_day_of_the_week_in_month.</entry>
+          </row>
+          <row>
+            <entry valign="top"><screen>nth_last_dst_rule(...)
+  Parameters:
+    start_rule
+    end_rule</screen></entry>
+ <entry>The DST start rule is of type gregorian::nth_day_of_the_week_in_month and the end rule is of type gregorian::last_day_of_the_week_in_month.</entry>
+          </row>
+          <row>
+            <entry valign="top"><screen>nth_kday_dst_rule(...)
+  Parameters:
+    start_rule
+    end_rule)
+(see note* below)</screen>
+            </entry>
+ <entry>Both rules are of type gregorian::nth_day_of_the_week_in_month.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable>
+    <para>
+ * Note: The name "nth_kday_dst_rule" is a bit cryptic. Therefore, a more descriptive name, "nth_day_of_the_week_in_month_dst_rule", is also provided.
+    </para>
+  </para>
+
+</section>
=======================================
--- /dev/null
+++ /trunk/libs/date_time/xmldoc/date_algorithms.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"../../../tools/boostbook/dtd/boostbook.dtd">
+
+<!-- Copyright (c) 2001-2005 CrystalClear Software, Inc.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<section id="date_time.gregorian.date_algorithms">
+  <title>Date Generators/Algorithms</title>
+  <bridgehead renderas="sect2">Date Generators/Algorithms</bridgehead>
+  <link linkend="algo_intro">Introduction</link> --
+  <link linkend="algo_header">Header</link> --
+  <link linkend="algo_overview">Class Overview</link> --
+  <link linkend="algo_func_overview">Function Overview</link>
+
+  <anchor id="algo_intro" />
+  <bridgehead renderas="sect3">Introduction</bridgehead>
+  <para>
+ Date algorithms or generators are tools for generating other dates or schedules of dates. A generator function starts with some part of a date such as a month and day and is supplied another part to then generate a concrete date. This allows the programmer to represent concepts such as "The first Sunday in February" and then create a concrete set of dates when provided with one or more years. + <emphasis>Note</emphasis>: As of boost version 1_31_0, date generator names have been changed. Old names are still available but are no longer documented and may someday be deprecated
+  </para>
+ <para>Also provided are stand-alone functions for generating a date, or calculation a duration of days. These functions take a date object and a weekday object as parameters.
+  </para>
+ <para>All date generator classes and functions are in the boost::gregorian namespace.
+  </para>
+  <para>
+ The <link linkend="date_time.examples.print_holidays">print holidays</link> example shows a detailed usage example.
+  </para>
+
+  <anchor id="algo_header" />
+  <bridgehead renderas="sect3">Header</bridgehead>
+ <para><programlisting>#include "boost/date_time/gregorian/gregorian.hpp"</programlisting>
+  </para>
+
+  <anchor id="algo_overview" />
+  <bridgehead renderas="sect3">Overview</bridgehead>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+       <row>
+ <entry valign="top" morerows="1">Class and get_date Parameter</entry>
+         <entry>Description</entry>
+       </row>
+       <row>
+         <entry>Example</entry>
+       </row>
+      </thead>
+      <tbody>
+        <row>
+          <entry valign="top" morerows="1"><screen>year_based_generator
+date get_date(greg_year year)</screen></entry>
+ <entry>A unifying (abstract) date_generator base type for: <code>partial_date</code>, <code>nth_day_of_the_week_in_month</code>, <code>first_day_of_the_week_in_month</code>, and <code>last_day_of_the_week_in_month</code>.</entry>
+       </row>
+       <row>
+ <entry>The <link linkend="date_time.examples.print_holidays">print holidays</link> example shows a detailed usage example.</entry>
+        </row>
+
+        <row>
+ <entry valign="top" morerows="1"><screen>last_day_of_the_week_in_month(greg_weekday,
+                              greg_month)
+date get_date(greg_year year)</screen></entry>
+         <entry>Calculate something like last Monday of January</entry>
+       </row>
+       <row>
+         <entry><screen>last_day_of_the_week_in_month lwdm(Monday,Jan);
+date d = lwdm.get_date(2002);
+//2002-Jan-28</screen>
+         </entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>first_day_of_the_week_in_month(greg_weekday,
+                               greg_month)
+date get_date(greg_year year)</screen></entry>
+         <entry>Calculate something like first Monday of January</entry>
+       </row>
+       <row>
+         <entry><screen>first_day_of_the_week_in_month fdm(Monday,Jan);
+date d = fdm.get_date(2002);
+//2002-Jan-07</screen>
+         </entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>nth_day_of_the_week_in_month(week_num,
+                             greg_weekday,
+                             greg_month)
+date get_date(greg_year year)</screen></entry>
+ <entry><code>week_num</code> is a public enum member of <code>nth_day_of_the_week_in_month</code>. Calculate something like first Monday of January, second Tuesday of March, Third Sunday of December, etc. (first through fifth are provided, fifth is the equivalent of last)</entry>
+       </row>
+       <row>
+          <entry><screen>typedef nth_day_of_the_week_in_month nth_dow;
+nth_dow ndm(nth_dow::third, Monday,Jan);
+date d = ndm.get_date(2002);
+//2002-Jan-21</screen>
+         </entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>partial_date(greg_day, greg_month)
+date get_date(greg_year year)</screen></entry>
+ <entry>Generates a date by applying the year to the given month and day.</entry>
+       </row>
+       <row>
+         <entry><screen>partial_date pd(1,Jan);
+date d = pd.get_date(2002);
+//2002-Jan-01</screen>
+         </entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>first_day_of_the_week_after(greg_weekday)
+date get_date(date d)</screen></entry>
+         <entry>Calculate something like First Sunday after Jan 1,2002</entry>
+       </row>
+       <row>
+         <entry><screen>first_day_of_the_week_after fdaf(Monday);
+date d = fdaf.get_date(date(2002,Jan,1));
+//2002-Jan-07</screen>
+         </entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>first_day_of_the_week_before(greg_weekday)
+date get_date(date d)</screen></entry>
+         <entry>Calculate something like First Monday before Feb 1,2002</entry>
+       </row>
+       <row>
+          <entry><screen>first_day_of_the_week_before fdbf(Monday);
+date d = fdbf.get_date(date(2002,Feb,1));
+//2002-Jan-28</screen>
+         </entry>
+       </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+
+  <anchor id="algo_func_overview" />
+  <bridgehead renderas="sect3">Function Overview</bridgehead>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+       <row>
+         <entry valign="top" morerows="1">Function Prototype</entry>
+         <entry>Description</entry>
+       </row>
+       <row>
+         <entry>Example</entry>
+       </row>
+      </thead>
+      <tbody>
+        <row>
+ <entry valign="top" morerows="1"><screen>days days_until_weekday date, greg_weekday)</screen></entry> + <entry> Calculates the number of days from given date until given weekday.</entry>
+       </row>
+       <row>
+         <entry><screen>date d(2004,Jun,1); // Tuesday
+greg_weekday gw(Friday);
+days_until_weekday(d, gw); // 3 days</screen>
+         </entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>days days_before_weekday(date, greg_weekday)</screen></entry> + <entry> Calculates the number of day from given date to previous given weekday.</entry>
+       </row>
+       <row>
+         <entry><screen>date d(2004,Jun,1); // Tuesday
+greg_weekday gw(Friday);
+days_before_weekday(d, gw); // 4 days</screen>
+         </entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>date next_weekday(date, greg_weekday)</screen></entry> + <entry> Generates a date object representing the date of the following weekday from the given date.</entry>
+       </row>
+       <row>
+         <entry><screen>date d(2004,Jun,1); // Tuesday
+greg_weekday gw(Friday);
+next_weekday(d, gw); // 2004-Jun-4</screen>
+         </entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>date previous_weekday(date, greg_weekday)</screen></entry> + <entry> Generates a date object representing the date of the previous weekday from the given date.</entry>
+       </row>
+       <row>
+          <entry><screen>date d(2004,Jun,1); // Tuesday
+greg_weekday gw(Friday);
+previous_weekday(d, gw); // 2004-May-28</screen>
+         </entry>
+       </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+</section>
=======================================
--- /dev/null
+++ /trunk/libs/date_time/xmldoc/date_class.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,524 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"../../../tools/boostbook/dtd/boostbook.dtd">
+
+<!-- Copyright (c) 2001-2007 CrystalClear Software, Inc.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<section id="date_time.gregorian.date_class">
+  <title>Date</title>
+
+  <link linkend="date_intro">Introduction</link> --
+  <link linkend="date_header">Header</link> --
+  <link linkend="date_construction">Construction</link> --
+ <link linkend="date_construct_from_string">Construct from String</link> --
+  <link linkend="date_construct_from_clock">Construct from Clock</link> --
+  <link linkend="date_accessors">Accessors</link> --
+  <link linkend="date_convert_to_string">Convert to String</link> --
+  <link linkend="date_operators">Operators</link> --
+  <link linkend="date_tm_funcs">Struct tm Functions</link>
+
+  <anchor id="date_intro" />
+  <bridgehead renderas="sect3">Introduction</bridgehead>
+  <para>
+ The class boost::gregorian::date is the primary interface for date programming. In general, + the date class is immutable once constructed although it does allow assignment from another
+    date.
+    Techniques for creating dates include reading the
+ <link linkend="date_construct_from_clock">current date from the clock</link>, + using <link linkend="date_time.gregorian.date_iterators">date iterators</link>, and + <link linkend="date_time.gregorian.date_algorithms">date algorithms or generators</link>.
+  </para>
+
+  <para>
+ Internally boost::gregorian::date is stored as a 32 bit integer type. The class is specifically + designed to NOT contain virtual functions. This design allows for efficient
+    calculation and memory usage with large collections of dates.
+  </para>
+
+  <para>
+ The construction of a date validates all input so that it is not possible to + construct an 'invalid' date. That is 2001-Feb-29 cannot be constructed as a date. + Various exceptions derived from std::out_of_range are thrown to indicate which aspect
+    of the date input is invalid.  Note that the
+ special value not-a-date-time can be used as 'invalid' or 'null' date if so desired.
+  </para>
+
+  <anchor id="date_header" />
+  <bridgehead renderas="sect3">Header</bridgehead>
+  <para>
+ <programlisting>#include "boost/date_time/gregorian/gregorian.hpp" //include all types plus i/o
+or
+#include "boost/date_time/gregorian/gregorian_types.hpp" //no i/o just types</programlisting>
+  </para>
+
+  <anchor id="date_construction" />
+  <bridgehead renderas="sect3">Construction</bridgehead>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+       <row>
+         <entry valign="top" morerows="1">Syntax</entry>
+         <entry>Description</entry>
+       </row>
+       <row>
+         <entry>Example</entry>
+       </row>
+      </thead>
+      <tbody>
+        <row>
+ <entry valign="top" morerows="1"><screen>date(greg_year, greg_month, greg_day)</screen></entry> + <entry>Construct from parts of date. Throws bad_year, bad_day_of_month, or bad_day_month (derivatives of std::out_of_range) if the year, month or day are out of range.</entry>
+       </row>
+       <row>
+         <entry><screen>date d(2002,Jan,10);</screen></entry>
+        </row>
+
+       <row>
+         <entry valign="top" morerows="1"><screen>date(date d)</screen></entry>
+         <entry>Copy constructor</entry>
+       </row>
+       <row>
+         <entry><screen>date d1(d);</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>date(special_values sv)</screen></entry> + <entry>Constructor for infinities, not-a-date-time, max_date_time, and min_date_time</entry>
+       </row>
+        <row>
+         <entry><screen>date d1(neg_infin);
+date d2(pos_infin);
+date d3(not_a_date_time);
+date d4(max_date_time);
+date d5(min_date_time);</screen></entry>
+        </row>
+
+       <row>
+         <entry valign="top" morerows="1"><screen>date()</screen></entry>
+ <entry>Default constructor. Creates a date object initialized to not_a_date_time. NOTE: this constructor can be disabled by defining DATE_TIME_NO_DEFAULT_CONSTRUCTOR (see compiler_config.hpp)</entry>
+       </row>
+       <row>
+ <entry><screen>date d; // d =&gt; not_a_date_time</screen></entry>
+       </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <anchor id="date_construct_from_string" />
+  <bridgehead renderas="sect3">Construct from String</bridgehead>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+       <row>
+         <entry valign="top" morerows="1">Syntax</entry>
+         <entry>Description</entry>
+       </row>
+       <row>
+         <entry>Example</entry>
+       </row>
+      </thead>
+      <tbody>
+        <row>
+ <entry valign="top" morerows="1"><screen>date from_string(std::string)</screen></entry> + <entry>From delimited date string where with order year-month-day eg: 2002-1-25</entry>
+       </row>
+       <row>
+         <entry><screen>std::string ds("2002/1/25");
+date d(from_string(ds));</screen></entry>
+        </row>
+
+        <row>
+ <entry valign="top" morerows="1"><screen>date from_undelimited_string(std::string)</screen></entry> + <entry>From iso type date string where with order year-month-day eg: 20020125</entry>
+       </row>
+       <row>
+         <entry><screen>std::string ds("20020125");
+date d(from_undelimited_string(ds));</screen></entry>
+       </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <anchor id="date_construct_from_clock" />
+  <bridgehead renderas="sect3">Construct from Clock</bridgehead>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+       <row>
+         <entry valign="top" morerows="1">Syntax</entry>
+         <entry>Description</entry>
+       </row>
+       <row>
+         <entry>Example</entry>
+       </row>
+      </thead>
+      <tbody>
+       <row>
+ <entry valign="top" morerows="1"><screen>day_clock::local_day()</screen></entry> + <entry>Get the local day based on the time zone settings of the computer.</entry>
+       </row>
+       <row>
+         <entry><screen>date d(day_clock::local_day());</screen></entry>
+        </row>
+
+        <row>
+ <entry valign="top" morerows="1"><screen>day_clock::universal_day()</screen></entry>
+         <entry>Get the UTC day.</entry>
+       </row>
+        <row>
+         <entry><screen>date d(day_clock::universal_day());</screen></entry>
+       </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <anchor id="date_accessors" />
+  <bridgehead renderas="sect3">Accessors</bridgehead>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+       <row>
+         <entry valign="top" morerows="1">Syntax</entry>
+         <entry>Description</entry>
+       </row>
+       <row>
+         <entry>Example</entry>
+       </row>
+      </thead>
+      <tbody>
+        <row>
+ <entry valign="top" morerows="1"><screen>greg_year year() const</screen></entry>
+         <entry>Get the year part of the date.</entry>
+       </row>
+       <row>
+         <entry><screen>date d(2002,Jan,10);
+d.year(); // --> 2002</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>greg_month month() const</screen></entry>
+         <entry>Get the month part of the date.</entry>
+       </row>
+       <row>
+         <entry><screen>date d(2002,Jan,10);
+d.month(); // --> 1</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>greg_day day() const</screen></entry>
+         <entry> Get the day part of the date.</entry>
+       </row>
+       <row>
+         <entry><screen>date d(2002,Jan,10);
+d.day(); // --> 10</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>greg_ymd year_month_day() const</screen></entry> + <entry>Return a year_month_day struct. More efficient when all 3 parts of the date are needed.</entry>
+       </row>
+       <row>
+         <entry><screen>date d(2002,Jan,10);
+date::ymd_type ymd = d.year_month_day();
+// ymd.year  --> 2002,
+// ymd.month --> 1,
+// ymd.day   --> 10</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>greg_day_of_week day_of_week() const</screen></entry>
+         <entry>Get the day of the week (Sunday, Monday, etc.)</entry>
+       </row>
+       <row>
+         <entry><screen>date d(2002,Jan,10);
+d.day(); // --> Thursday</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>greg_day_of_year day_of_year() const</screen></entry>
+         <entry>Get the day of the year. Number from 1 to 366 </entry>
+       </row>
+       <row>
+         <entry><screen>date d(2000,Jan,10);
+d.day_of_year(); // --> 10</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>date end_of_month() const</screen></entry> + <entry>Returns a <code>date</code> object set to the last day of the calling objects current month.</entry>
+       </row>
+       <row>
+         <entry><screen>date d(2000,Jan,10);
+d.end_of_month(); // --> 2000-Jan-31</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>bool is_infinity() const</screen></entry> + <entry>Returns true if date is either positive or negative infinity</entry>
+       </row>
+       <row>
+         <entry><screen>date d(pos_infin);
+d.is_infinity(); // --> true</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>bool is_neg_infinity() const</screen></entry>
+         <entry>Returns true if date is negative infinity</entry>
+       </row>
+       <row>
+         <entry><screen>date d(neg_infin);
+d.is_neg_infinity(); // --> true</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>bool is_pos_infinity() const</screen></entry>
+         <entry>Returns true if date is positive infinity</entry>
+       </row>
+       <row>
+         <entry><screen>date d(neg_infin);
+d.is_pos_infinity(); // --> true</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>bool is_not_a_date() const</screen></entry>
+         <entry>Returns true if value is not a date</entry>
+       </row>
+       <row>
+         <entry><screen>date d(not_a_date_time);
+d.is_not_a_date(); // --> true</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>bool is_special() const</screen></entry> + <entry>Returns true if date is any <code>special_value</code></entry>
+       </row>
+       <row>
+          <entry><screen>date d(pos_infin);
+date d2(not_a_date_time);
+date d3(2005,Mar,1);
+d.is_special(); // --> true
+d2.is_special(); // --> true
+d3.is_special(); // --> false</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>special_value as_special() const</screen></entry> + <entry>Returns represented <code>special_value</code> or <code>not_special</code> if the represented date is a normal date.</entry>
+       </row>
+       <row>
+         <entry><screen></screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>long modjulian_day() const</screen></entry>
+         <entry>Returns the modified julian day for the date.</entry>
+       </row>
+       <row>
+         <entry><screen></screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>long julian_day() const</screen></entry>
+         <entry>Returns the julian day for the date.</entry>
+       </row>
+       <row>
+         <entry><screen></screen></entry>
+        </row>
+
+        <row>
+ <entry valign="top" morerows="1"><screen>int week_number() const</screen></entry>
+         <entry>Returns the ISO 8601 week number for the date.</entry>
+       </row>
+       <row>
+         <entry><screen></screen></entry>
+       </row>
+        <row>
+ <entry valign="top" morerows="1"><screen>date end_of_month_day() const</screen></entry>
+         <entry>Returns the last day of the month for the date.</entry>
+       </row>
+       <row>
+         <entry><screen>date d(2000,Feb,1);
+//gets Feb 28 -- 2000 was leap year
+date eom = d.end_of_month_day();</screen></entry>
+       </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <anchor id="date_convert_to_string" />
+  <bridgehead renderas="sect3">Convert to String</bridgehead>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+       <row>
+         <entry valign="top" morerows="1">Syntax</entry>
+         <entry>Description</entry>
+       </row>
+       <row>
+         <entry>Example</entry>
+       </row>
+      </thead>
+      <tbody>
+        <row>
+ <entry valign="top" morerows="1"><screen>std::string to_simple_string(date d)</screen></entry> + <entry>To <code>YYYY-mmm-DD</code> string where <code>mmm</code> is a 3 char month name.</entry>
+       </row>
+       <row>
+         <entry><screen>"2002-Jan-01"</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>std::string to_iso_string(date d)</screen></entry> + <entry>To <code>YYYYMMDD</code> where all components are integers.</entry>
+       </row>
+       <row>
+         <entry><screen>"20020131"</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>std::string to_iso_extended_string(date d)</screen></entry> + <entry> To <code>YYYY-MM-DD</code> where all components are integers.</entry>
+       </row>
+        <row>
+         <entry><screen>"2002-01-31"</screen></entry>
+       </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <anchor id="date_operators" />
+  <bridgehead renderas="sect3">Operators</bridgehead>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+       <row>
+         <entry valign="top" morerows="1">Syntax</entry>
+         <entry>Description</entry>
+       </row>
+       <row>
+         <entry>Example</entry>
+       </row>
+      </thead>
+      <tbody>
+        <row>
+ <entry valign="top" morerows="1"><screen>operator&lt;&lt;</screen></entry>
+         <entry>Stream output operator</entry>
+       </row>
+       <row>
+         <entry><screen>date d(2002,Jan,1);
+std::cout &lt;&lt; d &lt;&lt; std::endl;</screen>
+         </entry>
+        </row>
+
+        <row>
+ <entry valign="top" morerows="1"><screen>operator&gt;&gt;</screen></entry> + <entry>Stream input operator. <emphasis role="strong">Note:</emphasis> As of version 1.33, streaming operations have been greatly improved. See <link linkend="date_time.date_time_io">Date Time IO System</link> for details on exceptions and error conditions.</entry>
+       </row>
+       <row>
+          <entry><screen>date d(not_a_date_time);
+stringstream ss("2002-Jan-01");
+ss &gt;&gt; d;</screen>
+         </entry>
+        </row>
+
+       <row>
+         <entry valign="top" morerows="1"><screen>operator==, operator!=,
+operator>, operator&lt;,
+operator>=, operator&lt;=</screen></entry>
+         <entry>A full complement of comparison operators</entry>
+       </row>
+       <row>
+         <entry><screen>d1 == d2, etc</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>date operator+(date_duration) const</screen></entry>
+         <entry>Return a date adding a day offset</entry>
+       </row>
+       <row>
+         <entry><screen>date d(2002,Jan,1);
+date_duration dd(1);
+date d2 = d + dd;</screen>
+         </entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>date operator-(date_duration) const</screen></entry>
+         <entry>Return a date by substracting a day offset</entry>
+       </row>
+       <row>
+         <entry><screen>date d(2002,Jan,1);
+date_duration dd(1);
+date d2 = d - dd;</screen>
+         </entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>date_duration operator-(date) const</screen></entry>
+         <entry>Return a date_duration by subtracting two dates</entry>
+       </row>
+        <row>
+         <entry><screen>date d1(2002,Jan,1);
+date d2(2002,Jan,2);
+date_duration dd = d2-d1;</screen>
+         </entry>
+       </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <anchor id="date_tm_funcs" />
+  <bridgehead renderas="sect3">Struct tm Functions</bridgehead>
+ <para>Functions for converting a <code>date</code> object to, and from, a <code>tm</code> struct are provided.</para>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+       <row>
+         <entry valign="top" morerows="1">Syntax</entry>
+         <entry>Description</entry>
+       </row>
+       <row>
+         <entry>Example</entry>
+       </row>
+      </thead>
+      <tbody>
+        <row>
+         <entry valign="top" morerows="1"><screen>tm 
to_tm(date)</screen></entry>
+ <entry>A function for converting a <code>date</code> object to a <code>tm</code> struct. The fields: <code>tm_hour</code>, <code>tm_min</code>, and <code>tm_sec</code> are set to zero. The <code>tm_isdst</code> field is set to -1.</entry>
+       </row>
+       <row>
+          <entry><screen>date d(2005,Jan,1);
+tm d_tm = to_tm(d);
+/* tm_year => 105
+   tm_mon  => 0
+   tm_mday => 1
+   tm_wday => 6 (Saturday)
+   tm_yday => 0
+   tm_hour => 0
+   tm_min  => 0
+   tm_sec  => 0
+   tm_isddst => -1 */</screen>
+         </entry>
+        </row>
+
+        <row>
+ <entry valign="top" morerows="1"><screen>date date_from_tm(tm datetm)</screen></entry> + <entry>A function for converting a <code>tm</code> struct to a <code>date</code> object. The fields: <code>tm_wday </code>, <code>tm_yday </code>, <code>tm_hour</code>, <code>tm_min</code>, <code>tm_sec</code>, and <code>tm_isdst</code> are ignored.</entry>
+       </row>
+       <row>
+          <entry><screen>tm d_tm;
+d_tm.tm_year = 105;
+d_tm.tm_mon  = 0;
+d_tm.tm_mday = 1;
+date d = date_from_tm(d_tm);
+// d => 2005-Jan-01</screen>
+          </entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+</section>
=======================================
--- /dev/null
+++ /trunk/libs/date_time/xmldoc/date_duration.xml      Mon Dec 28 23:05:14 2009
@@ -0,0 +1,250 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"../../../tools/boostbook/dtd/boostbook.dtd">
+
+<!-- Copyright (c) 2001-2005 CrystalClear Software, Inc.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<section xmlns:xi="http://www.w3.org/2001/XInclude"; id="date_time.gregorian.date_duration">
+  <title>Date Duration (aka Days)</title>
+
+  <link linkend="duration_intro">Introduction</link> --
+  <link linkend="duration_header">Header</link> --
+  <link linkend="duration_construction">Construction</link> --
+  <link linkend="duration_accessors">Accessors</link> --
+  <link linkend="duration_operators">Operators</link> --
+ <link linkend="additional_duration_types">Additional Duration Types</link>
+
+  <anchor id="duration_intro" />
+  <bridgehead renderas="sect3">Introduction</bridgehead>
+  <para>
+ The class boost::gregorian::date_duration is a simple day count used for arithmetic with <link linkend="date_time.gregorian.date_class">gregorian::date</link>. A duration can be either positive or negative.
+  </para>
+  <para>
+ As of version 1_32 the date_duration class has been typedef'd as days in the boost::gregorian namespace. Throughout the examples you will find days used instead of date_duration.
+  </para>
+
+  <anchor id="duration_header" />
+  <bridgehead renderas="sect3">Header</bridgehead>
+  <para>
+ <programlisting>#include "boost/date_time/gregorian/gregorian.hpp" //include all types plus i/o
+or
+#include "boost/date_time/gregorian/gregorian_types.hpp" //no i/o just types</programlisting>
+  </para>
+
+  <anchor id="duration_construction" />
+  <bridgehead renderas="sect3">Construction</bridgehead>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+       <row>
+         <entry valign="top" morerows="1">Syntax</entry>
+         <entry>Description</entry>
+        </row>
+        <row>
+         <entry>Example</entry>
+       </row>
+      </thead>
+      <tbody>
+       <row>
+ <entry valign="top" morerows="1"><screen>date_duration(long)</screen></entry>
+          <entry>Create a duration count.</entry>
+        </row>
+        <row>
+          <entry><screen>date_duration dd(3); //3 days</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>days(special_values sv)</screen></entry> + <entry>Constructor for infinities, not-a-date-time, max_date_time, and min_date_time</entry>
+       </row>
+        <row>
+         <entry><screen>days dd1(neg_infin);
+days dd2(pos_infin);
+days dd3(not_a_date_time);
+days dd4(max_date_time);
+days dd5(min_date_time);</screen></entry>
+        </row>
+
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <anchor id="duration_accessors" />
+  <bridgehead renderas="sect3">Accessors</bridgehead>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+       <row>
+         <entry valign="top" morerows="1">Syntax</entry>
+         <entry>Description</entry>
+       </row>
+       <row>
+         <entry>Example</entry>
+       </row>
+      </thead>
+      <tbody>
+        <row>
+ <entry valign="top" morerows="1"><screen>long days() const</screen></entry>
+         <entry>Get the day count.</entry>
+       </row>
+       <row>
+         <entry><screen>date_duration dd(3); dd.days() --> 3</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>bool is_negative() const</screen></entry>
+         <entry>True if number of days is less than zero.</entry>
+       </row>
+       <row>
+ <entry><screen>date_duration dd(-1); dd.is_negative() --> true</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>static date_duration unit()</screen></entry>
+         <entry>Return smallest possible unit of duration type.</entry>
+       </row>
+        <row>
+ <entry><screen>date_duration::unit() --> date_duration(1)</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>bool is_special() const</screen></entry> + <entry>Returns true if days is any <code>special_value</code></entry>
+       </row>
+       <row>
+          <entry><screen>days dd(pos_infin);
+days dd2(not_a_date_time);
+days dd3(25);
+dd.is_special(); // --> true
+dd2.is_special(); // --> true
+dd3.is_special(); // --> false</screen></entry>
+        </row>
+
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <anchor id="duration_operators" />
+  <bridgehead renderas="sect3">Operators</bridgehead>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+       <row>
+         <entry valign="top" morerows="1">Syntax</entry>
+         <entry>Description</entry>
+       </row>
+       <row>
+         <entry>Example</entry>
+       </row>
+      </thead>
+      <tbody>
+        <row>
+ <entry valign="top" morerows="1"><screen>operator&lt;&lt;, operator&gt;&gt;</screen></entry> + <entry>Streaming operators. <emphasis role="strong">Note:</emphasis> As of version 1.33, streaming operations have been greatly improved. See <link linkend="date_time.date_time_io">Date Time IO System</link> for more details (including exceptions and error conditions).</entry>
+       </row>
+       <row>
+          <entry><screen>date d(not_a_date_time);
+stringstream ss("2002-Jan-01");
+ss &gt;&gt; d;
+std::cout &lt;&lt; d; // "2002-Jan-01"
+</screen>
+         </entry>
+        </row>
+
+        <row>
+         <entry valign="top" morerows="1"><screen>operator==, operator!=,
+operator>, operator&lt;,
+operator>=, operator&lt;=</screen>
+         </entry>
+         <entry>A full complement of comparison operators</entry>
+       </row>
+       <row>
+         <entry><screen>dd1 == dd2, etc</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>date_duration operator+(date_duration) const</screen></entry>
+         <entry>Add date durations.</entry>
+       </row>
+       <row>
+         <entry><screen>date_duration dd1(3);
+date_duration dd2(5);
+date_duration dd3 = dd1 + dd2;</screen>
+         </entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>date_duration operator-(date_duration) const</screen></entry>
+         <entry>Subtract durations.</entry>
+       </row>
+        <row>
+         <entry><screen>date_duration dd1(3);
+date_duration dd2(5);
+date_duration dd3 = dd1 - dd2;</screen>
+         </entry>
+       </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <anchor id="additional_duration_types" />
+  <bridgehead renderas="sect3">Additional Duration Types</bridgehead>
+ <para>These additional types are logical representations of spans of days.</para>
+  <informaltable frame="all">
+    <tgroup cols="2">
+      <thead>
+       <row>
+         <entry valign="top" morerows="1">Syntax</entry>
+         <entry>Description</entry>
+        </row>
+        <row>
+         <entry>Example</entry>
+       </row>
+      </thead>
+      <tbody>
+       <row>
+ <entry valign="top" morerows="1"><screen>months(int num_of_months)</screen></entry> + <entry>A logical month representation. Depending on the usage, this <code>months</code> object may cover a span of 28 to 31 days. The objects also use a snap to end-of-month behavior when used in conjunction with a date that is the last day of a given month. <emphasis role="strong">WARNING: this behavior may lead to unexpected results.</emphasis> See: <link linkend="snap_to_details">Reversibility of Operations Pitfall</link> for complete details and alternatives.</entry>
+        </row>
+        <row>
+          <entry><screen>months single(1);
+date leap_year(2004,Jan,31);
+date norm_year(2005,Jan,31);
+leap_year + single; // => 2004-Feb-29
+norm_year + single; // => 2005-Feb-28
+date(2005,Jan,1) + single; // => 2005-Feb-01
+date(2005,Feb,1) + single; // => 2005-Mar-01
+date(2005,Feb,28) + single; // => 2005-Mar-31</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>years(int num_of_years)</screen></entry> + <entry>A logical representation of a year. The <code>years</code> object has the same behavior as the <code>months</code> objects with regards to the end-of-the-month.</entry>
+        </row>
+        <row>
+          <entry><screen>years single(1);
+date(2003,Feb,28) + single;
+// results in => 2004-Feb-29
+date(2004,Feb,29) + single;
+// results in => 2005-Feb-28</screen></entry>
+        </row>
+
+       <row>
+ <entry valign="top" morerows="1"><screen>weeks(int num_of_weeks)</screen></entry> + <entry>A duration type representing a number of <code>n * 7</code> days.</entry>
+        </row>
+        <row>
+          <entry><screen>weeks single(1);
+date(2005,Jan,1) + single; // => 2005-Jan-08</screen></entry>
+        </row>
+
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <xi:include href="snap_to_details.xml"/>
+
+</section>
=======================================
--- /dev/null
+++ /trunk/libs/date_time/xmldoc/date_facet.xml Mon Dec 28 23:05:14 2009
@@ -0,0 +1,319 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"../../../tools/boostbook/dtd/boostbook.dtd">
+
+<!-- Copyright (c) 2005 CrystalClear Software, Inc.
+     Subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+-->
+
+<section id="date_time.date_facet">
+  <title>Date Facet</title>
+
+  <link linkend="date_facet_intro">Introduction</link> -
+  <link linkend="date_facet_constr">Construction</link> -
+  <link linkend="date_facet_accessors">Accessors</link>
+
+  <anchor id="date_facet_intro" />
+  <bridgehead renderas="sect3">Introduction</bridgehead>
+ <para>The <code>boost::date_time::date_facet</code> enables users to have significant control over the output streaming of dates (and other gregorian objects). The date_facet is typedef'd in the <code>gregorian</code> namespace as <code>date_facet</code> and <code>wdate_facet</code>.
+  </para>
+
+  <anchor id="date_facet_constr" />
+  <bridgehead renderas="sect3">Construction</bridgehead>
+  <para>
+    <informaltable frame="all">
+      <tgroup cols="2">
+        <thead>
+          <row>
+            <entry>Syntax</entry>
+            <entry>Description</entry>
+          </row>
+        </thead>
+        <tbody>
+          <row>
+            <entry valign="top"><screen>date_facet()</screen></entry>
+            <entry>Default constructor</entry>
+          </row>
+          <row>
+            <entry valign="top"><screen>date_facet(...)
+  Parameters:
+    char_type* format
+    input_collection_type</screen></entry>
+ <entry>Format given will be used for date output. All other formats will use their defaults. Collection is the set of short names to be used for months. All other name collections will use their defaults.</entry>
+          </row>
+          <row>
+            <entry valign="top"><screen>date_facet(...)
+  Parameters:
+    char_type* format
+    period_formatter_type
+    special_values_formatter_type
+    date_gen_formatter_type</screen></entry>
+ <entry>Format given will be used for date output. The remaining parameters are formatter objects. Further details on these objects can be found <link linkend="date_time.io_objects">here</link>. This constructor also provides default arguments for all parameters except the format. Therefore, <code>date_facet("%m %d %Y")</code> will work.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable>
+  </para>
+
+  <anchor id="date_facet_accessors" />
+  <bridgehead renderas="sect3">Accessors</bridgehead>
+  <para>
+    <informaltable frame="all">
+      <tgroup cols="2">
+        <thead>
+          <row>
+            <entry valign="top" morerows="1">Syntax</entry>
+            <entry>Description</entry>
+          </row>
+          <row>
+              <entry>Example</entry>
+          </row>
+        </thead>
+        <tbody>
+          <row>
+ <entry valign="top" morerows="1"><screen>void format(char_type*)</screen></entry>
+            <entry>Set the format for dates.</entry>
+          </row>
+          <row>
+            <entry><screen>date_facet* f = new date_facet();
+f->format("%m %d %Y");</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>void set_iso_format()</screen></entry>
+            <entry>Sets the date format to ISO</entry>
+          </row>
+          <row>
+            <entry><screen>f->set_iso_format();
+// "%Y%m%d"</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>void set_iso_extended_format()</screen></entry>
+            <entry>Sets the date format to ISO Extended</entry>
+          </row>
+          <row>
+            <entry><screen>f->set_iso_extended_format();
+// "%Y-%m-%d"</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>void month_format(char_type*)</screen></entry> + <entry>Set the format for months when they are 'put' individually.</entry>
+          </row>
+          <row>
+            <entry><screen>f->month_format("%B");
+ss &lt;&lt; greg_month(12); // "December"</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>void weekday_format(char_type*)</screen></entry> + <entry>Set the format for weekdays when they are 'put' individually.</entry>
+          </row>
+          <row>
+            <entry><screen>f->weekday_format("%a");
+ss &lt;&lt; greg_weekday(2); // "Tue"</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>void period_formatter(...)
+  Parameter:
+    period_formatter_type</screen></entry>
+ <entry>Replaces the period formatter object with a user created one.</entry>
+          </row>
+          <row>
+ <entry>see the <link linkend="date_time.io_tutorial">tutorial</link> for a complete example.</entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>void special_values_formatter(...)
+  Parameter:
+    special_values_formatter_type</screen></entry>
+ <entry>Replaces the special_values formatter object with a user created one.</entry>
+          </row>
+          <row>
+ <entry>see the <link linkend="date_time.io_tutorial">tutorial</link> for a complete example.</entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>void date_gen_phrase_strings(...)
+  Parameters:
+    input_collection_type
+    date_gen_formatter_type::
+      phrase_elements</screen></entry>
+ <entry>Sets new date generator phrase strings in date_gen_formatter. The input collection is a vector of strings (for details on these strings see <link linkend="io_objects.date_generators">date generator formatter/parser documentation</link>). The phrase_elements parameter is an enum, defined in the date_generator_formatter object, that has a default value of 'first'. It is used to indicate what the position of the first string in the collection will be.</entry>
+          </row>
+          <row>
+            <entry><screen></screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>void short_weekday_names(...)
+  Parameter:
+    input_collection_type</screen></entry>
+ <entry>Replace strings used when 'putting' short weekdays.</entry>
+          </row>
+          <row>
+ <entry>see the <link linkend="date_time.io_tutorial">tutorial</link> for a complete example.</entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>void long_weekday_names(...)
+  Parameter:
+    input_collection_type</screen></entry>
+ <entry>Replace strings used when 'putting' long weekdays.</entry>
+          </row>
+          <row>
+ <entry>see the <link linkend="date_time.io_tutorial">tutorial</link> for a complete example.</entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>void short_month_names(...)
+  Parameter:
+    input_collection_type</screen></entry>
+ <entry>Replace strings used when 'putting' short months.</entry>
+          </row>
+          <row>
+ <entry>see the <link linkend="date_time.io_tutorial">tutorial</link> for a complete example.</entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>void long_month_names(...)
+  Parameter:
+    input_collection_type</screen></entry>
+            <entry>Replace strings used when 'putting' long months.</entry>
+          </row>
+          <row>
+ <entry>see the <link linkend="date_time.io_tutorial">tutorial</link> for a complete example.</entry>
+          </row>
+
+          <row>
+            <entry valign="top" morerows="1"><screen>OutItrT put(...)
+  Common parameters for all
+  'put' functions:
+    OutItrT
+    ios_base
+    char_type
+  Unique parameter for 'put' funcs:
+    gregorian object</screen></entry>
+ <entry>There are 12 put functions in the date_facet. The common paraeters are: an iterator pointing to the next item in the stream, an ios_base object, and the fill character. Each unique gregorian object has it's own put function. Each unique put function is described below.</entry>
+          </row>
+          <row>
+            <entry><screen></screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>OutItrT put(..., date)</screen></entry> + <entry>Puts a date object into the stream using the format set by <code>format(...)</code> or the default.</entry>
+          </row>
+          <row>
+            <entry><screen></screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>OutItrT put(..., days)</screen></entry>
+            <entry>Puts a days object into the stream as a number.</entry>
+          </row>
+          <row>
+            <entry><screen></screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>OutItrT put(..., month)</screen></entry> + <entry>Puts a month object into the stream using the format set by <code>month_format(...)</code> or the default.</entry>
+          </row>
+          <row>
+            <entry><screen></screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>OutItrT put(..., day)</screen></entry> + <entry>Puts a day of month object into the stream as a two digit number.</entry>
+          </row>
+          <row>
+            <entry><screen>"01" // January 1st</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>OutItrT put(..., day_of_week)</screen></entry> + <entry>Puts a day of week object into the stream using the format set by <code>weekday_format(...)</code> or the default.</entry>
+          </row>
+          <row>
+            <entry><screen></screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>OutItrT put(..., date_period)</screen></entry> + <entry>Puts a date_period into the stream. The format of the dates will use the format set by <code>format(..)</code> or the default date format. The type of period (open or closed range) and the delimiters used are those used by the period_formatter.</entry>
+          </row>
+          <row>
+            <entry><screen></screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>OutItrT put(..., partial_date)</screen></entry> + <entry>Puts a partial_date date_generator object into the stream. The month format used is set by <code>month_format(..)</code> or the default. The day of month is represented as a two digit number.</entry>
+          </row>
+          <row>
+            <entry><screen>"01 Jan" // default formats
+"01 January" // long month format</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>OutItrT put(..., date_generator)
+  Date Generator Type:
+    nth_day_of_the_week_in_month</screen></entry>
+ <entry>Puts a nth_day_of_the_week_in_month object into the stream. The month format is set by <code>month_format(...)</code> or the default. The weekday format is set by <code>weekday_format(...)</code> or the default. The remaining phrase elements are set in the <link linkend ="io_objects.date_generators">date_generator_formatter</link>.</entry>
+          </row>
+          <row>
+            <entry><screen>"third Fri in May" // defaults</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>OutItrT put(..., date_generator)
+  Date Generator Type:
+    first_day_of_the_week_in_month</screen></entry>
+ <entry>Puts a first_day_of_the_week_in_month object into the stream. The month format is set by <code>month_format(...)</code> or the default. The weekday format is set by <code>weekday_format(...)</code> or the default. The remaining phrase elements are set in the <link linkend ="io_objects.date_generators">date_generator_formatter</link>.</entry>
+          </row>
+          <row>
+            <entry><screen>"first Wed of Jun" // defaults</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>OutItrT put(..., date_generator)
+  Date Generator Type:
+    last_day_of_the_week_in_month</screen></entry>
+ <entry>Puts a last_day_of_the_week_in_month object into the stream. The month format is set by <code>month_format(...)</code> or the default. The weekday format is set by <code>weekday_format(...)</code> or the default. The remaining phrase elements are set in the <link linkend ="io_objects.date_generators">date_generator_formatter</link>.</entry>
+          </row>
+          <row>
+            <entry><screen>"last Tue of Mar" // defaults</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>OutItrT put(..., date_generator)
+  Date Generator Type:
+    first_day_of_the_week_after</screen></entry>
+ <entry>Puts a first_day_of_the_week_after object into the stream. The weekday format is set by <code>weekday_format(...)</code> or the default. The remaining phrase elements are set in the <link linkend ="io_objects.date_generators">date_generator_formatter</link>.</entry>
+          </row>
+          <row>
+            <entry><screen>"first Sat after" // defaults</screen></entry>
+          </row>
+
+          <row>
+ <entry valign="top" morerows="1"><screen>OutItrT put(..., date_generator)
+  Date Generator Type:
+    first_day_of_the_week_before</screen></entry>
+ <entry>Puts a first_day_of_the_week_before object into the stream. The weekday format is set by <code>weekday_format(...)</code> or the default. The remaining phrase elements are set in the <link linkend ="io_objects.date_generators">date_generator_formatter</link>.</entry>
+          </row>
+          <row>
+            <entry><screen>"first Mon before" // defaults</screen></entry>
+          </row>
+
+        </tbody>
+      </tgroup>
+    </informaltable>
+  </para>
+</section>
+
+
=======================================
***Additional files exist in this changeset.***

Other related posts:

  • » [boost-doc-zh] r359 committed - 加入qbk文件,其中accumulators, any, array, concept_check等4个库的qbk文件已译。 - boost-doc-zh