$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r60672 - in branches/release: . boost boost/algorithm/string boost/archive boost/bimap boost/config boost/detail boost/filesystem boost/functional/hash boost/fusion boost/graph boost/integer boost/interprocess boost/intrusive boost/iostreams boost/math boost/numeric/ublas boost/program_options boost/property_tree boost/proto boost/python boost/regex boost/serialization boost/signals boost/signals2 boost/spirit boost/spirit/home boost/spirit/home/karma boost/spirit/home/support boost/statechart boost/system boost/thread boost/tr1 boost/type_traits boost/unordered boost/utility boost/uuid boost/variant boost/wave doc libs libs/array/doc libs/bimap libs/config libs/filesystem libs/functional/hash libs/fusion libs/graph_parallel libs/integer libs/interprocess libs/intrusive libs/iostreams libs/math libs/mpl/doc/refmanual libs/mpl/doc/src/refmanual libs/numeric/ublas libs/numeric/ublas/doc libs/program_options libs/property_tree libs/proto/doc libs/proto/doc/reference libs/proto/doc/reference/concepts libs/python libs/regex libs/regex/doc libs/serialization libs/signals libs/signals2 libs/spirit libs/spirit/classic/example libs/spirit/doc libs/spirit/example libs/spirit/phoenix libs/spirit/test libs/spirit/test/qi libs/statechart libs/static_assert libs/system libs/thread libs/thread/doc libs/timer libs/tr1 libs/type_traits libs/unordered libs/utility libs/uuid libs/wave more people status tools tools/bcp tools/boostbook tools/build/v2 tools/inspect tools/quickbook tools/regression tools/release tools/wave wiki
From: eric_at_[hidden]
Date: 2010-03-16 21:17:07
Author: eric_niebler
Date: 2010-03-16 21:17:06 EDT (Tue, 16 Mar 2010)
New Revision: 60672
URL: http://svn.boost.org/trac/boost/changeset/60672
Log:
Merged revisions 60633,60639,60659,60671 via svnmerge from 
https://svn.boost.org/svn/boost/trunk
........
  r60633 | eric_niebler | 2010-03-16 12:20:57 +1100 (Tue, 16 Mar 2010) | 1 line
  
  add proto::assert_matches function and friends to debug.hpp, flesh out docs for Expr concept
........
  r60639 | eric_niebler | 2010-03-16 15:55:13 +1100 (Tue, 16 Mar 2010) | 1 line
  
  simplify and generalize display_expr
........
  r60659 | eric_niebler | 2010-03-17 09:35:40 +1100 (Wed, 17 Mar 2010) | 1 line
  
  BOOST_PROTO_ASSERT_MATCHES should incur no runtime overhead
........
  r60671 | eric_niebler | 2010-03-17 11:43:14 +1100 (Wed, 17 Mar 2010) | 1 line
  
  add assert_matches/assert_matches_not to function list
........
Properties modified: 
   branches/release/   (props changed)
   branches/release/CMakeLists.txt   (props changed)
   branches/release/INSTALL   (props changed)
   branches/release/Jamroot   (props changed)
   branches/release/LICENSE_1_0.txt   (props changed)
   branches/release/boost/   (props changed)
   branches/release/boost-build.jam   (props changed)
   branches/release/boost.css   (props changed)
   branches/release/boost.png   (props changed)
   branches/release/boost/algorithm/string/   (props changed)
   branches/release/boost/archive/   (props changed)
   branches/release/boost/array.hpp   (props changed)
   branches/release/boost/bimap/   (props changed)
   branches/release/boost/config/   (props changed)
   branches/release/boost/detail/   (props changed)
   branches/release/boost/filesystem/   (props changed)
   branches/release/boost/functional/hash/   (props changed)
   branches/release/boost/fusion/   (props changed)
   branches/release/boost/graph/   (props changed)
   branches/release/boost/integer/   (props changed)
   branches/release/boost/interprocess/   (props changed)
   branches/release/boost/intrusive/   (props changed)
   branches/release/boost/iostreams/   (props changed)
   branches/release/boost/math/   (props changed)
   branches/release/boost/numeric/ublas/   (props changed)
   branches/release/boost/program_options/   (props changed)
   branches/release/boost/property_tree/   (props changed)
   branches/release/boost/python/   (props changed)
   branches/release/boost/regex/   (props changed)
   branches/release/boost/serialization/   (props changed)
   branches/release/boost/signals/   (props changed)
   branches/release/boost/signals2/   (props changed)
   branches/release/boost/spirit/   (props changed)
   branches/release/boost/spirit/home/   (props changed)
   branches/release/boost/spirit/home/karma/   (props changed)
   branches/release/boost/spirit/home/support/attributes.hpp   (props changed)
   branches/release/boost/statechart/   (props changed)
   branches/release/boost/system/   (props changed)
   branches/release/boost/thread/   (props changed)
   branches/release/boost/thread.hpp   (props changed)
   branches/release/boost/tr1/   (props changed)
   branches/release/boost/type_traits/   (props changed)
   branches/release/boost/unordered/   (props changed)
   branches/release/boost/utility/   (props changed)
   branches/release/boost/utility/value_init.hpp   (props changed)
   branches/release/boost/uuid/   (props changed)
   branches/release/boost/variant/   (props changed)
   branches/release/boost/version.hpp   (props changed)
   branches/release/boost/wave/   (props changed)
   branches/release/bootstrap.bat   (props changed)
   branches/release/bootstrap.sh   (props changed)
   branches/release/doc/   (props changed)
   branches/release/index.htm   (props changed)
   branches/release/index.html   (props changed)
   branches/release/libs/   (props changed)
   branches/release/libs/array/doc/array.xml   (props changed)
   branches/release/libs/bimap/   (props changed)
   branches/release/libs/config/   (props changed)
   branches/release/libs/filesystem/   (props changed)
   branches/release/libs/functional/hash/   (props changed)
   branches/release/libs/fusion/   (props changed)
   branches/release/libs/graph_parallel/   (props changed)
   branches/release/libs/integer/   (props changed)
   branches/release/libs/interprocess/   (props changed)
   branches/release/libs/intrusive/   (props changed)
   branches/release/libs/iostreams/   (props changed)
   branches/release/libs/libraries.htm   (props changed)
   branches/release/libs/maintainers.txt   (props changed)
   branches/release/libs/math/   (props changed)
   branches/release/libs/mpl/doc/refmanual/broken-compiler-workarounds.html   (props changed)
   branches/release/libs/mpl/doc/refmanual/categorized-index-concepts.html   (props changed)
   branches/release/libs/mpl/doc/refmanual/cfg-no-preprocessed-headers.html   (props changed)
   branches/release/libs/mpl/doc/refmanual/composition-and-argument-binding.html   (props changed)
   branches/release/libs/mpl/doc/refmanual/data-types-concepts.html   (props changed)
   branches/release/libs/mpl/doc/refmanual/data-types-miscellaneous.html   (props changed)
   branches/release/libs/mpl/doc/refmanual/extensible-associative-sequence.html   (props changed)
   branches/release/libs/mpl/doc/refmanual/inserter-class.html   (props changed)
   branches/release/libs/mpl/doc/refmanual/tag-dispatched-metafunction.html   (props changed)
   branches/release/libs/mpl/doc/refmanual/trivial-metafunctions-summary.html   (props changed)
   branches/release/libs/mpl/doc/src/refmanual/Iterators-Iterator.rst   (props changed)
   branches/release/libs/numeric/ublas/   (props changed)
   branches/release/libs/numeric/ublas/doc/   (props changed)
   branches/release/libs/program_options/   (props changed)
   branches/release/libs/property_tree/   (props changed)
   branches/release/libs/python/   (props changed)
   branches/release/libs/regex/   (props changed)
   branches/release/libs/regex/doc/   (props changed)
   branches/release/libs/serialization/   (props changed)
   branches/release/libs/signals/   (props changed)
   branches/release/libs/signals2/   (props changed)
   branches/release/libs/spirit/   (props changed)
   branches/release/libs/spirit/classic/example/   (props changed)
   branches/release/libs/spirit/doc/   (props changed)
   branches/release/libs/spirit/example/   (props changed)
   branches/release/libs/spirit/phoenix/   (props changed)
   branches/release/libs/spirit/test/   (props changed)
   branches/release/libs/spirit/test/qi/optional.cpp   (props changed)
   branches/release/libs/statechart/   (props changed)
   branches/release/libs/static_assert/   (props changed)
   branches/release/libs/system/   (props changed)
   branches/release/libs/thread/   (props changed)
   branches/release/libs/thread/doc/   (props changed)
   branches/release/libs/timer/   (props changed)
   branches/release/libs/tr1/   (props changed)
   branches/release/libs/type_traits/   (props changed)
   branches/release/libs/unordered/   (props changed)
   branches/release/libs/utility/   (props changed)
   branches/release/libs/utility/swap.html   (props changed)
   branches/release/libs/utility/value_init.htm   (props changed)
   branches/release/libs/utility/value_init_test.cpp   (props changed)
   branches/release/libs/uuid/   (props changed)
   branches/release/libs/wave/   (props changed)
   branches/release/more/   (props changed)
   branches/release/people/   (props changed)
   branches/release/rst.css   (props changed)
   branches/release/status/   (props changed)
   branches/release/status/Jamfile.v2   (props changed)
   branches/release/tools/   (props changed)
   branches/release/tools/bcp/   (props changed)
   branches/release/tools/boostbook/   (props changed)
   branches/release/tools/build/v2/   (props changed)
   branches/release/tools/inspect/   (props changed)
   branches/release/tools/quickbook/   (props changed)
   branches/release/tools/regression/   (props changed)
   branches/release/tools/release/   (props changed)
   branches/release/tools/wave/   (props changed)
   branches/release/wiki/   (props changed)
Text files modified: 
   branches/release/boost/proto/debug.hpp                      |   201 ++++++++++++++++++++++----------------- 
   branches/release/libs/proto/doc/propdocs.sh                 |     2                                         
   branches/release/libs/proto/doc/reference.xml               |    10 +                                       
   branches/release/libs/proto/doc/reference/concepts/Expr.xml |   123 +++++++++++++++--------                 
   branches/release/libs/proto/doc/reference/debug.xml         |   175 ++++++++++++++++++++++++++++++++++      
   5 files changed, 380 insertions(+), 131 deletions(-)
Modified: branches/release/boost/proto/debug.hpp
==============================================================================
--- branches/release/boost/proto/debug.hpp	(original)
+++ branches/release/boost/proto/debug.hpp	2010-03-16 21:17:06 EDT (Tue, 16 Mar 2010)
@@ -11,106 +11,95 @@
 
 #include <boost/preprocessor/iteration/local.hpp>
 #include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/preprocessor/stringize.hpp>
 #include <iomanip>
 #include <iostream>
 #include <typeinfo>
+#include <boost/mpl/assert.hpp>
 #include <boost/proto/proto_fwd.hpp>
 #include <boost/proto/expr.hpp>
 #include <boost/proto/traits.hpp>
+#include <boost/proto/matches.hpp>
 #include <boost/proto/detail/dont_care.hpp>
 
 namespace boost { namespace proto
 {
     namespace tag
     {
-        namespace hidden_detail_
-        {
-            typedef char (¬_ostream)[sizeof(std::ostream)+1];
-            not_ostream operator<<(std::ostream &, detail::dont_care);
-
-            template<typename Tag, std::size_t S>
-            struct printable_tag_
-            {
-                typedef char const *type;
-                static type call() { return typeid(Tag).name(); }
-            };
-
-            template<typename Tag>
-            struct printable_tag_<Tag, sizeof(std::ostream)>
-            {
-                typedef Tag type;
-                static type call() { return Tag(); }
-            };
-
-            template<typename Tag>
-            struct printable_tag
-              : printable_tag_<Tag, sizeof(std::cout << Tag())>
-            {};
-        }
-
-        /// INTERNAL ONLY
-        template<typename Tag>
-        inline typename hidden_detail_::printable_tag<Tag>::type proto_tag_name(Tag)
-        {
-            return hidden_detail_::printable_tag<Tag>::call();
-        }
-
-    #define BOOST_PROTO_DEFINE_TAG_NAME(Tag)                                    \
+    #define BOOST_PROTO_DEFINE_TAG_INSERTION(Tag)                               \
         /** \brief INTERNAL ONLY */                                             \
-        inline char const *proto_tag_name(tag::Tag)                             \
+        inline std::ostream &operator <<(std::ostream &sout, Tag const &)       \
         {                                                                       \
-            return #Tag;                                                        \
+            return sout << BOOST_PP_STRINGIZE(Tag);                             \
         }                                                                       \
         /**/
 
-        BOOST_PROTO_DEFINE_TAG_NAME(terminal)
-        BOOST_PROTO_DEFINE_TAG_NAME(unary_plus)
-        BOOST_PROTO_DEFINE_TAG_NAME(negate)
-        BOOST_PROTO_DEFINE_TAG_NAME(dereference)
-        BOOST_PROTO_DEFINE_TAG_NAME(complement)
-        BOOST_PROTO_DEFINE_TAG_NAME(address_of)
-        BOOST_PROTO_DEFINE_TAG_NAME(logical_not)
-        BOOST_PROTO_DEFINE_TAG_NAME(pre_inc)
-        BOOST_PROTO_DEFINE_TAG_NAME(pre_dec)
-        BOOST_PROTO_DEFINE_TAG_NAME(post_inc)
-        BOOST_PROTO_DEFINE_TAG_NAME(post_dec)
-        BOOST_PROTO_DEFINE_TAG_NAME(shift_left)
-        BOOST_PROTO_DEFINE_TAG_NAME(shift_right)
-        BOOST_PROTO_DEFINE_TAG_NAME(multiplies)
-        BOOST_PROTO_DEFINE_TAG_NAME(divides)
-        BOOST_PROTO_DEFINE_TAG_NAME(modulus)
-        BOOST_PROTO_DEFINE_TAG_NAME(plus)
-        BOOST_PROTO_DEFINE_TAG_NAME(minus)
-        BOOST_PROTO_DEFINE_TAG_NAME(less)
-        BOOST_PROTO_DEFINE_TAG_NAME(greater)
-        BOOST_PROTO_DEFINE_TAG_NAME(less_equal)
-        BOOST_PROTO_DEFINE_TAG_NAME(greater_equal)
-        BOOST_PROTO_DEFINE_TAG_NAME(equal_to)
-        BOOST_PROTO_DEFINE_TAG_NAME(not_equal_to)
-        BOOST_PROTO_DEFINE_TAG_NAME(logical_or)
-        BOOST_PROTO_DEFINE_TAG_NAME(logical_and)
-        BOOST_PROTO_DEFINE_TAG_NAME(bitwise_and)
-        BOOST_PROTO_DEFINE_TAG_NAME(bitwise_or)
-        BOOST_PROTO_DEFINE_TAG_NAME(bitwise_xor)
-        BOOST_PROTO_DEFINE_TAG_NAME(comma)
-        BOOST_PROTO_DEFINE_TAG_NAME(mem_ptr)
-        BOOST_PROTO_DEFINE_TAG_NAME(assign)
-        BOOST_PROTO_DEFINE_TAG_NAME(shift_left_assign)
-        BOOST_PROTO_DEFINE_TAG_NAME(shift_right_assign)
-        BOOST_PROTO_DEFINE_TAG_NAME(multiplies_assign)
-        BOOST_PROTO_DEFINE_TAG_NAME(divides_assign)
-        BOOST_PROTO_DEFINE_TAG_NAME(modulus_assign)
-        BOOST_PROTO_DEFINE_TAG_NAME(plus_assign)
-        BOOST_PROTO_DEFINE_TAG_NAME(minus_assign)
-        BOOST_PROTO_DEFINE_TAG_NAME(bitwise_and_assign)
-        BOOST_PROTO_DEFINE_TAG_NAME(bitwise_or_assign)
-        BOOST_PROTO_DEFINE_TAG_NAME(bitwise_xor_assign)
-        BOOST_PROTO_DEFINE_TAG_NAME(subscript)
-        BOOST_PROTO_DEFINE_TAG_NAME(member)
-        BOOST_PROTO_DEFINE_TAG_NAME(if_else_)
-        BOOST_PROTO_DEFINE_TAG_NAME(function)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(terminal)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(unary_plus)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(negate)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(dereference)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(complement)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(address_of)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(logical_not)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(pre_inc)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(pre_dec)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(post_inc)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(post_dec)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(shift_left)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(shift_right)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(multiplies)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(divides)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(modulus)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(plus)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(minus)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(less)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(greater)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(less_equal)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(greater_equal)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(equal_to)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(not_equal_to)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(logical_or)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(logical_and)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(bitwise_and)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(bitwise_or)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(bitwise_xor)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(comma)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(mem_ptr)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(assign)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(shift_left_assign)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(shift_right_assign)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(multiplies_assign)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(divides_assign)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(modulus_assign)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(plus_assign)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(minus_assign)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(bitwise_and_assign)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(bitwise_or_assign)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(bitwise_xor_assign)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(subscript)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(member)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(if_else_)
+        BOOST_PROTO_DEFINE_TAG_INSERTION(function)
 
-    #undef BOOST_PROTO_DEFINE_TAG_NAME
+    #undef BOOST_PROTO_DEFINE_TAG_INSERTION
+    }
+
+    namespace hidden_detail_
+    {
+        struct ostream_wrapper
+        {
+            ostream_wrapper(std::ostream &sout)
+              : sout_(sout)
+            {}
+
+            std::ostream &sout_;
+        };
+
+        template<typename Tag>
+        std::ostream &operator <<(ostream_wrapper sout_wrap, Tag const &)
+        {
+            return sout_wrap.sout_ << typeid(Tag).name();
+        }
     }
 
     namespace functional
@@ -140,9 +129,9 @@
             template<typename Tag, typename Args>
             void operator()(proto::expr<Tag, Args, 0> const &expr) const
             {
-                using namespace tag;
+                using namespace hidden_detail_;
                 this->sout_ << std::setw(this->depth_) << (this->first_? "" : ", ")
-                    << proto_tag_name(Tag()) << "(" << proto::value(expr) << ")\n";
+                    << Tag() << "(" << proto::value(expr) << ")\n";
                 this->first_ = false;
             }
 
@@ -155,9 +144,9 @@
             template<typename Tag, typename Args>                                                   \
             void operator()(proto::expr<Tag, Args, N> const &expr) const                            \
             {                                                                                       \
-                using namespace tag;                                                                \
+                using namespace hidden_detail_;                                                     \
                 this->sout_ << std::setw(this->depth_) << (this->first_? "" : ", ")                 \
-                    << proto_tag_name(Tag()) << "(\n";                                              \
+                    << Tag() << "(\n";                                                              \
                 display_expr display(this->sout_, this->depth_ + 4);                                \
                 BOOST_PP_REPEAT(N, BOOST_PROTO_CHILD, _)                                            \
                 this->sout_ << std::setw(this->depth_) << "" << ")\n";                              \
@@ -206,6 +195,46 @@
         functional::display_expr()(expr);
     }
 
+    /// \brief Assert at compile time that a particular expression
+    ///        matches the specified grammar.
+    ///
+    /// \note Equivalent to <tt>BOOST_MPL_ASSERT((proto::matches\<Expr, Grammar\>))</tt>
+    /// \param expr The Proto expression to check againts <tt>Grammar</tt>
+    template<typename Grammar, typename Expr>
+    void assert_matches(Expr const & /*expr*/)
+    {
+        BOOST_MPL_ASSERT((proto::matches<Expr, Grammar>));
+    }
+
+    /// \brief Assert at compile time that a particular expression
+    ///        does not match the specified grammar.
+    ///
+    /// \note Equivalent to <tt>BOOST_MPL_ASSERT_NOT((proto::matches\<Expr, Grammar\>))</tt>
+    /// \param expr The Proto expression to check againts <tt>Grammar</tt>
+    template<typename Grammar, typename Expr>
+    void assert_matches_not(Expr const & /*expr*/)
+    {
+        BOOST_MPL_ASSERT_NOT((proto::matches<Expr, Grammar>));
+    }
+
+    /// \brief Assert at compile time that a particular expression
+    ///        matches the specified grammar.
+    ///
+    /// \note Equivalent to <tt>proto::assert_matches\<Grammar\>(Expr)</tt>
+    /// \param Expr The Proto expression to check againts <tt>Grammar</tt>
+    /// \param Grammar The grammar used to validate Expr.
+    #define BOOST_PROTO_ASSERT_MATCHES(Expr, Grammar)                                               \
+        (true ? (void)0 : boost::proto::assert_matches<Grammar>(Expr))
+
+    /// \brief Assert at compile time that a particular expression
+    ///        does not match the specified grammar.
+    ///
+    /// \note Equivalent to <tt>proto::assert_matches_not\<Grammar\>(Expr)</tt>
+    /// \param Expr The Proto expression to check againts <tt>Grammar</tt>
+    /// \param Grammar The grammar used to validate Expr.
+    #define BOOST_PROTO_ASSERT_MATCHES_NOT(Expr, Grammar)                                           \
+        (true ? (void)0 : boost::proto::assert_matches_not<Grammar>(Expr))
+
 }}
 
 #endif
Modified: branches/release/libs/proto/doc/propdocs.sh
==============================================================================
--- branches/release/libs/proto/doc/propdocs.sh	(original)
+++ branches/release/libs/proto/doc/propdocs.sh	2010-03-16 21:17:06 EDT (Tue, 16 Mar 2010)
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-rsync --delete --rsh=ssh --recursive html/* eric_niebler,boost-sandbox_at_[hidden]:/home/groups/b/bo/boost-sandbox/htdocs/libs/proto/doc/html
+rsync --delete --rsh=ssh --recursive -p html/* eric_niebler,boost-sandbox_at_[hidden]:/home/groups/b/bo/boost-sandbox/htdocs/libs/proto/doc/html
Modified: branches/release/libs/proto/doc/reference.xml
==============================================================================
--- branches/release/libs/proto/doc/reference.xml	(original)
+++ branches/release/libs/proto/doc/reference.xml	2010-03-16 21:17:06 EDT (Tue, 16 Mar 2010)
@@ -938,6 +938,16 @@
       </listitem>
       <listitem>
         <computeroutput>
+          <functionname alt="boost::proto::assert_matches">proto::assert_matches()</functionname>
+        </computeroutput>
+      </listitem>
+      <listitem>
+        <computeroutput>
+          <functionname alt="boost::proto::assert_matches_not">proto::assert_matches_not()</functionname>
+        </computeroutput>
+      </listitem>
+      <listitem>
+        <computeroutput>
           <functionname alt="boost::proto::child">proto::child()</functionname>
         </computeroutput>
       </listitem>
Modified: branches/release/libs/proto/doc/reference/concepts/Expr.xml
==============================================================================
--- branches/release/libs/proto/doc/reference/concepts/Expr.xml	(original)
+++ branches/release/libs/proto/doc/reference/concepts/Expr.xml	2010-03-16 21:17:06 EDT (Tue, 16 Mar 2010)
@@ -7,21 +7,21 @@
   Software License, Version 1.0. (See accompanying
   file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
   -->
-  <param name="Expr" role="expession-type" />
-  <param name="Tag" role="tag-type" />
-  <param name="Domain" role="domain-type" />
-  <param name="N" role="mpl-integral-constant-type" />
+  <param name="Expr" role="expession-type"/>
+  <param name="Tag" role="tag-type"/>
+  <param name="Domain" role="domain-type"/>
+  <param name="N" role="mpl-integral-constant-type"/>
 
   <models-sentence>
-    The type <arg num="1" /> must be a model of <self/>.
+    The type <arg num="1"/> must be a model of <self/>.
   </models-sentence>
 
   <models-sentence>
-    The type <arg num="3" /> must be a model of <conceptname>Domain</conceptname>.
+    The type <arg num="3"/> must be a model of <conceptname>Domain</conceptname>.
   </models-sentence>
 
   <models-sentence>
-    The type <arg num="4" /> must be a model of MPL Integral Constant.
+    The type <arg num="4"/> must be a model of MPL Integral Constant.
   </models-sentence>
 
   <description>
@@ -37,26 +37,32 @@
 
   <notation variables="e">
     <sample-value>
-      <type name="Expr" />
+      <type name="Expr"/>
     </sample-value>
   </notation>
 
   <associated-type name="proto_tag">
-    <get-member-type name="type">
-      <apply-template name="boost::proto::tag_of">
-        <type name="Expr"/>
-      </apply-template>
+    <get-member-type name="proto_tag">
+      <type name="Expr"/>
     </get-member-type>
     <description>
       <simpara>The tag type of the Expr.</simpara>
     </description>
   </associated-type>
 
+  <associated-type name="proto_args">
+    <get-member-type name="proto_args">
+      <type name="Expr"/>
+    </get-member-type>
+    <description>
+      <simpara>A typelist representing either the types of the child nodes, or,
+        if the arity of the Expr is 0, of the value of the terminal.</simpara>
+    </description>
+  </associated-type>
+
   <associated-type name="proto_arity">
-    <get-member-type name="type">
-      <apply-template name="boost::proto::arity_of">
-        <type name="Expr"/>
-      </apply-template>
+    <get-member-type name="proto_arity">
+      <type name="Expr"/>
     </get-member-type>
     <description>
       <simpara>
@@ -66,53 +72,62 @@
     </description>
   </associated-type>
 
-  <associated-type name="proto_domain">
-    <get-member-type name="type">
-      <apply-template name="boost::proto::domain_of">
-        <type name="Expr"/>
-      </apply-template>
+  <associated-type name="proto_base_expr">
+    <get-member-type name="proto_base_expr">
+      <type name="Expr"/>
     </get-member-type>
     <description>
       <simpara>
-        The Domain of the Expr. <computeroutput>proto_domain</computeroutput>
-        models <conceptname>Domain</conceptname>.
+        A typedef for an instantiation of
+        <classname alt="boost::proto::expr"><code>proto::expr<></code></classname>
+        that is equivalent to Expr. Expression types are equivalent if they have the
+        same <code>proto_tag</code>, <code>proto_args</code>, and <code>proto_arity</code>.
       </simpara>
     </description>
   </associated-type>
 
-  <associated-type name="childN_type">
-    <get-member-type name="type">
-      <apply-template name="boost::proto::result_of::child">
-        <type name="Expr"/>
-        <type name="N"/>
-      </apply-template>
+  <associated-type name="proto_derived_expr">
+    <get-member-type name="proto_derived_expr">
+      <type name="Expr"/>
     </get-member-type>
     <description>
-      <simpara>The Nth child of Expr.</simpara>
+      <simpara>
+        A typedef for <code>Expr</code>.
+      </simpara>
     </description>
   </associated-type>
 
-  <associated-type name="value_type">
-    <get-member-type name="type">
-      <apply-template name="boost::proto::result_of::value">
-        <type name="Expr"/>
-      </apply-template>
+  <associated-type name="proto_domain">
+    <get-member-type name="proto_domain">
+      <type name="Expr"/>
+    </get-member-type>
+    <description>
+      <simpara>
+        The Domain of the Expr. <computeroutput>proto_domain</computeroutput>
+        models <conceptname>Domain</conceptname>.
+      </simpara>
+    </description>
+  </associated-type>
+
+  <associated-type name="proto_childN">
+    <get-member-type name="proto_childN">
+      <type name="Expr"/>
     </get-member-type>
     <description>
-      <simpara>The value of a terminal Expr.
-        Requires <computeroutput>0 == proto_arity::value</computeroutput>.</simpara>
+      <simpara>The type of the Nth child of Expr. Requires 
+        <code>0 == N::value || N::value < proto_arity::value</code></simpara>
     </description>
   </associated-type>
 
   <valid-expression name="Get N-th Child">
     <apply-function name="boost::proto::child< N >">
       <sample-value>
-        <type name="Expr" />
+        <type name="Expr"/>
       </sample-value>
     </apply-function>
     <return-type>
       <require-same-type testable="yes">
-        <type name="childN_type"/>
+        <type name="proto_childN"/>
       </require-same-type>
     </return-type>
     <semantics>Extracts the Nth child from this Expr.
@@ -122,20 +137,40 @@
   <valid-expression name="Get Terminal Value">
     <apply-function name="boost::proto::value">
       <sample-value>
-        <type name="Expr" />
+        <type name="Expr"/>
       </sample-value>
     </apply-function>
     <return-type>
       <require-same-type testable="yes">
-        <type name="value_type"/>
+        <type name="proto_child0"/>
+      </require-same-type>
+    </return-type>
+    <semantics>
+      Extracts the value from a terminal Expr.
+      Requires <computeroutput>0 == proto_arity::value</computeroutput>.
+    </semantics>
+  </valid-expression>
+
+  <valid-expression name="Get Base">
+    <apply-method name="proto_base">
+      <sample-value>
+        <type name="Expr"/>
+      </sample-value>
+    </apply-method>
+    <return-type>
+      <require-same-type testable="yes">
+        <type name="proto_base_expr"/>
       </require-same-type>
     </return-type>
-    <semantics>Extracts the value from a terminal Expr.
-      Requires <computeroutput>0 == proto_arity::value</computeroutput>.</semantics>
+    <semantics>
+        Returns an object of type
+        <classname alt="boost::proto::expr"><code>proto::expr<></code></classname>
+        that is equivalent to <code>e</code>.
+    </semantics>
   </valid-expression>
 
   <example-model>
-    <type name="boost::proto::literal< int >" />
+    <type name="boost::proto::literal< int >"/>
   </example-model>
 
 </concept>
Modified: branches/release/libs/proto/doc/reference/debug.xml
==============================================================================
--- branches/release/libs/proto/doc/reference/debug.xml	(original)
+++ branches/release/libs/proto/doc/reference/debug.xml	2010-03-16 21:17:06 EDT (Tue, 16 Mar 2010)
@@ -93,6 +93,181 @@
         </notes>
       </overloaded-function>
 
+      <!-- proto::assert_matches -->
+      <function name="assert_matches">
+        <type>void</type>
+        <template>
+          <template-type-parameter name="Grammar"/>
+          <template-type-parameter name="Expr"/>
+        </template>
+        <parameter name="expr">
+          <paramtype>Expr const &</paramtype>
+          <purpose>
+            The Proto expression to check againts <code>Grammar</code>.
+          </purpose>
+        </parameter>
+        <purpose>
+          Assert at compile time that a particular expression
+          matches the specified grammar.
+        </purpose>
+        <notes>
+          <para>
+            Equivalent to <code>BOOST_MPL_ASSERT((<classname alt="proto::matches">proto::matches</classname><Expr, Grammar>))</code>.
+          </para>
+        </notes>
+        <description>
+          <para>
+            Use <code>proto::assert_matches()</code> to assert at compile-time that
+            an expression matches a grammar. 
+          </para>
+          <para>
+            <emphasis role="bold">Example:</emphasis><programlisting>typedef proto::plus< proto::terminal< int >, proto::terminal< int > > PlusInts;
+
+proto::assert_matches<PlusInts>( <functionname>proto::lit</functionname>(1) + 42 );</programlisting>
+          </para>
+          <para>
+            See also:
+            <itemizedlist>
+              <listitem>
+                <code><functionname>proto::assert_matches_not</functionname>()</code>
+              </listitem>
+              <listitem>
+                <code><macroname>BOOST_PROTO_ASSERT_MATCHES</macroname>()</code>
+              </listitem>
+              <listitem>
+                <code><macroname>BOOST_PROTO_ASSERT_MATCHES_NOT</macroname>()</code>
+              </listitem>
+            </itemizedlist>
+          </para>
+        </description>
+      </function>
+
+      <!-- proto::assert_matches_not -->
+      <function name="assert_matches_not">
+        <type>void</type>
+        <template>
+          <template-type-parameter name="Grammar"/>
+          <template-type-parameter name="Expr"/>
+        </template>
+        <parameter name="expr">
+          <paramtype>Expr const &</paramtype>
+          <purpose>
+            The Proto expression to check againts <code>Grammar</code>.
+          </purpose>
+        </parameter>
+        <purpose>
+          Assert at compile time that a particular expression
+          does not match the specified grammar.
+        </purpose>
+        <notes>
+          <para>
+            Equivalent to <code>BOOST_MPL_ASSERT_NOT((<classname alt="proto::matches">proto::matches</classname><Expr, Grammar>))</code>.
+          </para>
+        </notes>
+        <description>
+          <para>
+            Use <code>proto::assert_matches_not()</code> to assert at compile-time that
+            an expression does not match a grammar. 
+          </para>
+          <para>
+            <emphasis role="bold">Example:</emphasis><programlisting>typedef proto::plus< proto::terminal< int >, proto::terminal< int > > PlusInts;
+
+proto::assert_matches_not<PlusInts>( <functionname>proto::lit</functionname>("a string") + 42 );</programlisting>
+          </para>
+          <para>
+            See also:
+            <itemizedlist>
+              <listitem>
+                <code><functionname>proto::assert_matches</functionname>()</code>
+              </listitem>
+              <listitem>
+                <code><macroname>BOOST_PROTO_ASSERT_MATCHES</macroname>()</code>
+              </listitem>
+              <listitem>
+                <code><macroname>BOOST_PROTO_ASSERT_MATCHES_NOT</macroname>()</code>
+              </listitem>
+            </itemizedlist>
+          </para>
+        </description>
+      </function>
     </namespace>
   </namespace>
+
+  <macro name="BOOST_PROTO_ASSERT_MATCHES" kind="functionlike">
+    <macro-parameter name="expr"/>
+    <macro-parameter name="Grammar"/>
+    <purpose>
+      Assert at compile time that a particular expression
+      matches the specified grammar.
+    </purpose>
+    <notes>
+      <para>
+        Equivalent to <code><functionname alt="boost::proto::assert_matches">proto::assert_matches</functionname><Grammar>(expr)</code>.
+      </para>
+    </notes>
+    <description>
+      <para>
+        Use <code>BOOST_PROTO_ASSERT_MATCHES()</code> to assert at compile-time that
+        an expression matches a grammar.
+      </para>
+      <para>
+        <emphasis role="bold">Example:</emphasis><programlisting>typedef <classname alt="boost::proto::plus">proto::plus</classname>< <classname alt="boost::proto::terminal">proto::terminal</classname>< int >, <classname alt="boost::proto::terminal">proto::terminal</classname>< int > > PlusInts;
+
+BOOST_PROTO_ASSERT_MATCHES( <functionname alt="boost::proto::lit">proto::lit</functionname>(1) + 42, PlusInts );</programlisting>
+      </para>
+      <para>
+        See also:
+        <itemizedlist>
+          <listitem>
+            <code><functionname alt="boost::proto::assert_matches">proto::assert_matches</functionname>()</code>
+          </listitem>
+          <listitem>
+            <code><functionname alt="boost::proto::assert_matches_not">proto::assert_matches_not</functionname>()</code>
+          </listitem>
+          <listitem>
+            <code><macroname>BOOST_PROTO_ASSERT_MATCHES_NOT</macroname>()</code>
+          </listitem>
+        </itemizedlist>
+      </para>
+    </description>
+  </macro>
+
+  <macro name="BOOST_PROTO_ASSERT_MATCHES_NOT" kind="functionlike">
+    <macro-parameter name="expr"/>
+    <macro-parameter name="Grammar"/>
+    <purpose>
+      Assert at compile time that a particular expression
+      does not match the specified grammar.
+    </purpose>
+    <notes>
+      <para>
+        Equivalent to <code><functionname alt="boost::proto::assert_matches_not">proto::assert_matches_not</functionname><Grammar>(expr)</code>.
+      </para>
+    </notes>
+    <description>
+      <para>
+        Use <code>BOOST_PROTO_ASSERT_MATCHES_NOT()</code> to assert at compile-time that
+        an expression does not match a grammar. 
+      </para>
+      <para>
+        <emphasis role="bold">Example:</emphasis><programlisting>typedef <classname alt="boost::proto::plus">proto::plus</classname>< <classname alt="boost::proto::terminal">proto::terminal</classname>< int >, <classname alt="boost::proto::terminal">proto::terminal</classname>< int > > PlusInts;
+
+BOOST_PROTO_ASSERT_MATCHES_NOT( <functionname alt="boost::proto::lit">proto::lit</functionname>("a string") + 42, PlusInts );</programlisting>
+      </para>
+      <para>
+        See also:
+        <itemizedlist>
+          <listitem>
+            <code><functionname alt="boost::proto::assert_matches">proto::assert_matches</functionname>()</code>
+          </listitem>
+          <listitem>
+            <code><functionname alt="boost::proto::assert_matches_not">proto::assert_matches_not</functionname>()</code>
+          </listitem>
+          <listitem>
+            <code><macroname>BOOST_PROTO_ASSERT_MATCHES</macroname>()</code>
+          </listitem>
+        </itemizedlist>
+      </para>
+    </description>
+  </macro>
 </header>