Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2008-02-10 10:26:58


Author: danieljames
Date: 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
New Revision: 43211
URL: http://svn.boost.org/trac/boost/changeset/43211

Log:
Merge from trunk.
Added:
   branches/fix-links/libs/mpi/src/python/py_nonblocking.cpp
      - copied unchanged from r43210, /trunk/libs/mpi/src/python/py_nonblocking.cpp
   branches/fix-links/libs/mpi/src/python/request_with_value.hpp
      - copied unchanged from r43210, /trunk/libs/mpi/src/python/request_with_value.hpp
   branches/fix-links/libs/mpi/test/python/nonblocking_test.py
      - copied unchanged from r43210, /trunk/libs/mpi/test/python/nonblocking_test.py
Properties modified:
   branches/fix-links/ (props changed)
Text files modified:
   branches/fix-links/boost/program_options/detail/parsers.hpp | 2
   branches/fix-links/boost/range/detail/implementation_help.hpp | 4
   branches/fix-links/boost/range/iterator_range.hpp | 4
   branches/fix-links/boost/range/sub_range.hpp | 4
   branches/fix-links/boost/xpressive/detail/core/matcher/attr_matcher.hpp | 2
   branches/fix-links/boost/xpressive/proto/eval.hpp | 4
   branches/fix-links/boost/xpressive/proto/fusion.hpp | 18 +++
   branches/fix-links/boost/xpressive/proto/matches.hpp | 216 ++++++++++++++++++++++++++++++++++++---
   branches/fix-links/boost/xpressive/proto/proto.hpp | 1
   branches/fix-links/boost/xpressive/proto/transform/fold.hpp | 12 +-
   branches/fix-links/boost/xpressive/traits/cpp_regex_traits.hpp | 2
   branches/fix-links/libs/mpi/build/Jamfile.v2 | 1
   branches/fix-links/libs/mpi/build/__init__.py | 4
   branches/fix-links/libs/mpi/doc/mpi.qbk | 3
   branches/fix-links/libs/mpi/src/python/documentation.cpp | 150 ++++++++++++++++++++++-----
   branches/fix-links/libs/mpi/src/python/module.cpp | 4
   branches/fix-links/libs/mpi/src/python/py_communicator.cpp | 13 +-
   branches/fix-links/libs/mpi/src/python/py_exception.cpp | 9
   branches/fix-links/libs/mpi/src/python/py_request.cpp | 90 +++++++++++----
   branches/fix-links/libs/mpi/src/python/py_timer.cpp | 2
   branches/fix-links/libs/mpi/src/python/skeleton_and_content.cpp | 21 ++-
   branches/fix-links/libs/mpi/src/python/status.cpp | 2
   branches/fix-links/libs/program_options/src/cmdline.cpp | 4
   branches/fix-links/libs/xpressive/proto/doc/construction.qbk | 174 ++++++++++++++++++++++++++++++++
   branches/fix-links/libs/xpressive/proto/doc/proto.qbk | 1
   branches/fix-links/libs/xpressive/proto/doc/protodoc.xml | 118 +++++++++++++--------
   branches/fix-links/tools/build/v2/tools/intel-darwin.jam | 11 -
   branches/fix-links/tools/build/v2/tools/mpi.jam | 6 +
   branches/fix-links/tools/inspect/index.html | 2
   branches/fix-links/tools/jam/src/execunix.c | 20 ++-
   30 files changed, 721 insertions(+), 183 deletions(-)

Modified: branches/fix-links/boost/program_options/detail/parsers.hpp
==============================================================================
--- branches/fix-links/boost/program_options/detail/parsers.hpp (original)
+++ branches/fix-links/boost/program_options/detail/parsers.hpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -38,7 +38,7 @@
     : detail::cmdline(
         // Explicit template arguments are required by gcc 3.3.1
         // (at least mingw version), and do no harm on other compilers.
- to_internal(detail::make_vector<charT, charT**>(argv+1, argv+argc)))
+ to_internal(detail::make_vector<charT, charT**>(argv+1, argv+argc+!argc)))
     {}
 
     

Modified: branches/fix-links/boost/range/detail/implementation_help.hpp
==============================================================================
--- branches/fix-links/boost/range/detail/implementation_help.hpp (original)
+++ branches/fix-links/boost/range/detail/implementation_help.hpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -25,6 +25,8 @@
 {
     namespace range_detail
     {
+ template <typename T>
+ inline void boost_range_silence_warning( const T& ) { }
         
         /////////////////////////////////////////////////////////////////////
         // end() help
@@ -82,12 +84,14 @@
         template< class T, std::size_t sz >
         inline std::size_t array_size( T BOOST_RANGE_ARRAY_REF()[sz] )
         {
+ boost_range_silence_warning( boost_range_array );
             return sz;
         }
 
         template< class T, std::size_t sz >
         inline std::size_t array_size( const T BOOST_RANGE_ARRAY_REF()[sz] )
         {
+ boost_range_silence_warning( boost_range_array );
             return sz;
         }
 

Modified: branches/fix-links/boost/range/iterator_range.hpp
==============================================================================
--- branches/fix-links/boost/range/iterator_range.hpp (original)
+++ branches/fix-links/boost/range/iterator_range.hpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -11,7 +11,7 @@
 #ifndef BOOST_RANGE_ITERATOR_RANGE_HPP
 #define BOOST_RANGE_ITERATOR_RANGE_HPP
 
-#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
     #pragma warning( push )
     #pragma warning( disable : 4996 )
 #endif
@@ -640,7 +640,7 @@
 
 #undef BOOST_OLD_IOSTREAMS
 
-#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
     #pragma warning( pop )
 #endif
 

Modified: branches/fix-links/boost/range/sub_range.hpp
==============================================================================
--- branches/fix-links/boost/range/sub_range.hpp (original)
+++ branches/fix-links/boost/range/sub_range.hpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -11,7 +11,7 @@
 #ifndef BOOST_RANGE_SUB_RANGE_HPP
 #define BOOST_RANGE_SUB_RANGE_HPP
 
-#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
     #pragma warning( push )
     #pragma warning( disable : 4996 )
 #endif
@@ -163,7 +163,7 @@
 
 } // namespace 'boost'
 
-#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
     #pragma warning( pop )
 #endif
 

Modified: branches/fix-links/boost/xpressive/detail/core/matcher/attr_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/attr_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/attr_matcher.hpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -62,6 +62,8 @@
         {
             return this->traits_.translate_nocase(ch1);
         }
+ private:
+ char_translate &operator =(char_translate const &);
     };
 
     ///////////////////////////////////////////////////////////////////////////////

Modified: branches/fix-links/boost/xpressive/proto/eval.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/eval.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/eval.hpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -58,8 +58,8 @@
 
             /// \brief Evaluate a given Proto expression with a given
             /// context.
- /// \param The Proto expression to evaluate
- /// \param The context in which the expression should be
+ /// \param expr The Proto expression to evaluate
+ /// \param context The context in which the expression should be
             /// evaluated.
             /// \return <tt>typename Context::template eval<Expr>()(expr, context)</tt>
             template<typename Expr, typename Context>

Modified: branches/fix-links/boost/xpressive/proto/fusion.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/fusion.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/fusion.hpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -554,7 +554,7 @@
                     typename proto::result_of::arg_c<
                         Sequence
                       , Index::value
- >::const_reference
+ >::reference
                 type;
 
                 static type call(Sequence &seq)
@@ -562,6 +562,22 @@
                     return proto::arg_c<Index::value>(seq);
                 }
             };
+
+ template<typename Sequence, typename Index>
+ struct apply<Sequence const, Index>
+ {
+ typedef
+ typename proto::result_of::arg_c<
+ Sequence
+ , Index::value
+ >::const_reference
+ type;
+
+ static type call(Sequence const &seq)
+ {
+ return proto::arg_c<Index::value>(seq);
+ }
+ };
         };
 
         #if BOOST_VERSION >= 103500

Modified: branches/fix-links/boost/xpressive/proto/matches.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/matches.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/matches.hpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -363,7 +363,7 @@
             template<typename Expr, typename If, typename Then, typename Else>
             struct matches_<Expr, proto::if_<If, Then, Else> >
               : mpl::eval_if<
- typename when<_, If>::template result<void(Expr, mpl::void_, mpl::void_)>::type
+ typename when<_, If>::template result<void(Expr, int, int)>::type
                   , matches_<Expr, typename Then::proto_base_expr>
                   , matches_<Expr, typename Else::proto_base_expr>
>::type
@@ -371,7 +371,7 @@
 
             template<typename Expr, typename If>
             struct matches_<Expr, proto::if_<If> >
- : when<_, If>::template result<void(Expr, mpl::void_, mpl::void_)>::type
+ : when<_, If>::template result<void(Expr, int, int)>::type
             {};
 
             // handle proto::not_
@@ -417,14 +417,12 @@
             /// matches some \c Bx for \c x in <tt>[0,n)</tt>.
             /// \li An expression \c E matches <tt>and_\<B0,B1,...Bn\></tt> if \c E
             /// matches all \c Bx for \c x in <tt>[0,n)</tt>.
- /// \li An expression \c E matches <tt>if_\<T\></tt> if
- /// <tt>when\<_,T\>::result\<void(E,int,int)\>::type::value</tt>
- /// is \c true.
             /// \li An expression \c E matches <tt>if_\<T,U,V\></tt> if
- /// <tt>when\<_,T\>::result\<void(E,int,int)\>::type::value</tt>
- /// is \c true and \E matches \c U; or, if
- /// <tt>when\<_,T\>::result\<void(E,int,int)\>::type::value</tt>
- /// is \c false and \E matches \c V.
+ /// <tt>when\<_,T\>::::result\<void(E,int,int)\>::::type::value</tt>
+ /// is \c true and \c E matches \c U; or, if
+ /// <tt>when\<_,T\>::::result\<void(E,int,int)\>::::type::value</tt>
+ /// is \c false and \c E matches \c V. (Note: \c U defaults to \c _
+ /// and \c V defaults to \c not\<_\>.)
             /// \li An expression \c E matches <tt>not_\<T\></tt> if \c E does
             /// not match \c T.
             /// \li An expression \c E matches <tt>switch_\<C\></tt> if
@@ -440,7 +438,7 @@
             /// \li \c A is <tt>B const &</tt>
             /// \li \c B is <tt>exact\<A\></tt>
             /// \li \c B is <tt>convertible_to\<X\></tt> and
- /// <tt>is_convertible\<A,X\>::value</tt> is \c true.
+ /// <tt>is_convertible\<A,X\>::::value</tt> is \c true.
             /// \li \c A is <tt>X[M]</tt> or <tt>X(&)[M]</tt> and
             /// \c B is <tt>X[proto::N]</tt>.
             /// \li \c A is <tt>X(&)[M]</tt> and \c B is <tt>X(&)[proto::N]</tt>.
@@ -467,6 +465,47 @@
 
         namespace wildcardns_
         {
+ /// \brief A wildcard grammar element that matches any expression,
+ /// and a transform that returns the current expression unchanged.
+ ///
+ /// The wildcard type, \c _, is a grammar element such that
+ /// <tt>matches\<E,_\>::::value</tt> is \c true for any expression
+ /// type \c E.
+ ///
+ /// The wildcard can also be used as a stand-in for a template
+ /// argument when matching terminals. For instance, the following
+ /// is a grammar that will match any <tt>std::complex\<\></tt>
+ /// terminal:
+ ///
+ /// \code
+ /// BOOST_MPL_ASSERT((
+ /// matches<
+ /// terminal<std::complex<double> >::type
+ /// , terminal<std::complex< _ > >
+ /// >
+ /// ));
+ /// \endcode
+ ///
+ /// When used as a transform, \c _ returns the current expression
+ /// unchanged. For instance, in the following, \c _ is used with
+ /// the \c fold\<\> transform to fold the children of a node:
+ ///
+ /// \code
+ /// struct CountChildren
+ /// : or_<
+ /// // Terminals have no children
+ /// when<terminal<_>, mpl::int_<0>()>
+ /// // Use fold<> to count the children of non-terminals
+ /// , otherwise<
+ /// fold<
+ /// _ // <-- fold the current expression
+ /// , mpl::int_<0>()
+ /// , mpl::plus<_state, mpl::int_<1> >()
+ /// >
+ /// >
+ /// >
+ /// {};
+ /// \endcode
             struct _ : proto::callable
             {
                 typedef _ proto_base_expr;
@@ -481,7 +520,7 @@
                 };
 
                 /// \param expr An expression
- /// \return expr
+ /// \return \c expr
                 template<typename Expr, typename State, typename Visitor>
                 Expr const &operator ()(Expr const &expr, State const &, Visitor &) const
                 {
@@ -492,7 +531,13 @@
 
         namespace control
         {
- // not_
+ /// \brief Inverts the set of expressions matched by a grammar. When
+ /// used as a transform, \c not_\<\> returns the current expression
+ /// unchanged.
+ ///
+ /// If an expression type \c E does not match a grammar \c G, then
+ /// \c E \e does match <tt>not_\<G\></tt>. For example,
+ /// <tt>not_\<terminal\<_\> \></tt> will match any non-terminal.
             template<typename Grammar>
             struct not_ : proto::callable
             {
@@ -508,7 +553,8 @@
                 };
 
                 /// \param expr An expression
- /// \return expr
+ /// \pre <tt>matches\<Expr,not_\>::::value</tt> is \c true.
+ /// \return \c expr
                 template<typename Expr, typename State, typename Visitor>
                 Expr const &operator ()(Expr const &expr, State const &, Visitor &) const
                 {
@@ -516,7 +562,56 @@
                 }
             };
 
- // if_
+ /// \brief Used to select one grammar or another based on the result
+ /// of a compile-time Boolean. When used as a transform, \c if_\<\>
+ /// selects between two transforms based on a compile-time Boolean.
+ ///
+ /// When <tt>if_\<If,Then,Else\></tt> is used as a grammar, \c If
+ /// must be a Proto transform and \c Then and \c Else must be grammars.
+ /// An expression type \c E matches <tt>if_\<If,Then,Else\></tt> if
+ /// <tt>when\<_,If\>::::result\<void(E,int,int)\>::::type::value</tt>
+ /// is \c true and \c E matches \c U; or, if
+ /// <tt>when\<_,If\>::::result\<void(E,int,int)\>::::type::value</tt>
+ /// is \c false and \c E matches \c V.
+ ///
+ /// The template parameter \c Then defaults to \c _
+ /// and \c Else defaults to \c not\<_\>, so an expression type \c E
+ /// will match <tt>if_\<If\></tt> if and only if
+ /// <tt>when\<_,If\>::::result\<void(E,int,int)\>::::type::value</tt>
+ /// is \c true.
+ ///
+ /// \code
+ /// // A grammar that only matches integral terminals,
+ /// // using is_integral<> from Boost.Type_traits.
+ /// struct IsIntegral
+ /// : and_<
+ /// terminal<_>
+ /// , if_< is_integral<_arg>() >
+ /// >
+ /// {};
+ /// \endcode
+ ///
+ /// When <tt>if_\<If,Then,Else\></tt> is used as a transform, \c If,
+ /// \c Then and \c Else must be Proto transforms. When applying
+ /// the transform to an expression \c E, state \c S and visitor \c V,
+ /// if <tt>when\<_,If\>::::result\<void(E,S,V)\>::::type::value</tt>
+ /// is \c true then the \c Then transform is applied; otherwise
+ /// the \c Else transform is applied.
+ ///
+ /// \code
+ /// // Match a terminal. If the terminal is integral, return
+ /// // mpl::true_; otherwise, return mpl::false_.
+ /// struct IsIntegral2
+ /// : when<
+ /// terminal<_>
+ /// , if_<
+ /// is_integral<_arg>()
+ /// , mpl::true_()
+ /// , mpl::false_()
+ /// >
+ /// >
+ /// {};
+ /// \endcode
             template<typename If, typename Then, typename Else>
             struct if_ : proto::callable
             {
@@ -546,7 +641,7 @@
                 /// \param expr An expression
                 /// \param state The current state
                 /// \param visitor A visitor of arbitrary type
- /// \return <tt>result\<void(Expr, State, Visitor)\>::which()(expr, state, visitor)</tt>
+ /// \return <tt>result\<void(Expr, State, Visitor)\>::::which()(expr, state, visitor)</tt>
                 template<typename Expr, typename State, typename Visitor>
                 typename result<void(Expr, State, Visitor)>::type
                 operator ()(Expr const &expr, State const &state, Visitor &visitor) const
@@ -559,7 +654,18 @@
                 }
             };
 
- // or_
+ /// \brief For matching one of a set of alternate grammars. Alternates
+ /// tried in order to avoid ambiguity. When used as a transform, \c or_\<\>
+ /// applies the transform associated with the first grammar that matches
+ /// the expression.
+ ///
+ /// An expression type \c E matches <tt>or_\<B0,B1,...Bn\></tt> if \c E
+ /// matches any \c Bx for \c x in <tt>[0,n)</tt>.
+ ///
+ /// When applying <tt>or_\<B0,B1,...Bn\></tt> as a transform with an
+ /// expression \c e of type \c E, state \c s and visitor \c v, it is
+ /// equivalent to <tt>Bx()(e, s, v)</tt>, where \c x is the lowest
+ /// number such that <tt>matches\<E,Bx\>::::value</tt> is \c true.
             template<BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY, typename G)>
             struct or_ : proto::callable
             {
@@ -578,7 +684,8 @@
                 /// \param expr An expression
                 /// \param state The current state
                 /// \param visitor A visitor of arbitrary type
- /// \return <tt>result\<void(Expr, State, Visitor)\>::which()(expr, state, visitor)</tt>
+ /// \pre <tt>matches\<Expr,or_\>::::value</tt> is \c true.
+ /// \return <tt>result\<void(Expr, State, Visitor)\>::::which()(expr, state, visitor)</tt>
                 template<typename Expr, typename State, typename Visitor>
                 typename result<void(Expr, State, Visitor)>::type
                 operator ()(Expr const &expr, State const &state, Visitor &visitor) const
@@ -588,7 +695,16 @@
                 }
             };
 
- // and_
+ /// \brief For matching all of a set of grammars. When used as a
+ /// transform, \c and_\<\> applies the transform associated with
+ /// the last grammar in the set.
+ ///
+ /// An expression type \c E matches <tt>and_\<B0,B1,...Bn\></tt> if \c E
+ /// matches all \c Bx for \c x in <tt>[0,n)</tt>.
+ ///
+ /// When applying <tt>and_\<B0,B1,...Bn\></tt> as a transform with an
+ /// expression \c e, state \c s and visitor \c v, it is
+ /// equivalent to <tt>Bn()(e, s, v)</tt>.
             template<BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY, typename G)>
             struct and_ : proto::callable
             {
@@ -607,7 +723,8 @@
                 /// \param expr An expression
                 /// \param state The current state
                 /// \param visitor A visitor of arbitrary type
- /// \return <tt>result\<void(Expr, State, Visitor)\>::which()(expr, state, visitor)</tt>
+ /// \pre <tt>matches\<Expr,and_\>::::value</tt> is \c true.
+ /// \return <tt>result\<void(Expr, State, Visitor)\>::::which()(expr, state, visitor)</tt>
                 template<typename Expr, typename State, typename Visitor>
                 typename result<void(Expr, State, Visitor)>::type
                 operator ()(Expr const &expr, State const &state, Visitor &visitor) const
@@ -617,7 +734,22 @@
                 }
             };
 
- // switch_
+ /// \brief For matching one of a set of alternate grammars, which
+ /// are looked up based on an expression's tag type. When used as a
+ /// transform, \c switch_\<\> applies the transform associated with
+ /// the grammar that matches the expression.
+ ///
+ /// \note \c switch_\<\> is functionally identical to \c or_\<\> but
+ /// is often more efficient. It does a fast, O(1) lookup based on an
+ /// expression's tag type to find a sub-grammar that may potentially
+ /// match the expression.
+ ///
+ /// An expression type \c E matches <tt>switch_\<C\></tt> if \c E
+ /// matches <tt>C::case_\<E::proto_tag\></tt>.
+ ///
+ /// When applying <tt>switch_\<C\></tt> as a transform with an
+ /// expression \c e of type \c E, state \c s and visitor \c v, it is
+ /// equivalent to <tt>C::case_\<E::proto_tag\>()(e, s, v)</tt>.
             template<typename Cases>
             struct switch_ : proto::callable
             {
@@ -636,7 +768,8 @@
                 /// \param expr An expression
                 /// \param state The current state
                 /// \param visitor A visitor of arbitrary type
- /// \return <tt>result\<void(Expr, State, Visitor)\>::which()(expr, state, visitor)</tt>
+ /// \pre <tt>matches\<Expr,switch_\>::::value</tt> is \c true.
+ /// \return <tt>result\<void(Expr, State, Visitor)\>::::which()(expr, state, visitor)</tt>
                 template<typename Expr, typename State, typename Visitor>
                 typename result<void(Expr, State, Visitor)>::type
                 operator ()(Expr const &expr, State const &state, Visitor &visitor) const
@@ -646,14 +779,55 @@
                 }
             };
 
+ /// \brief For forcing exact matches of terminal types.
+ ///
+ /// By default, matching terminals ignores references and
+ /// cv-qualifiers. For instance, a terminal expression of
+ /// type <tt>terminal\<int const &\>::::type</tt> will match
+ /// the grammar <tt>terminal\<int\></tt>. If that is not
+ /// desired, you can force an exact match with
+ /// <tt>terminal\<exact\<int\> \></tt>. This will only
+ /// match integer terminals where the terminal is held by
+ /// value.
             template<typename T>
             struct exact
             {};
 
+ /// \brief For matching terminals that are convertible to
+ /// a type.
+ ///
+ /// Use \c convertible_to\<\> to match a terminal that is
+ /// convertible to some type. For example, the grammar
+ /// <tt>terminal\<convertible_to\<int\> \></tt> will match
+ /// any terminal whose argument is convertible to an integer.
+ ///
+ /// \note The trait \c is_convertible\<\> from Boost.Type_traits
+ /// is used to determinal convertibility.
             template<typename T>
             struct convertible_to
             {};
 
+ /// \brief For matching a Grammar to a variable number of
+ /// sub-expressions.
+ ///
+ /// An expression type <tt>expr\<AT, argsN\<A0,...An,U0,...Um\> \></tt>
+ /// matches a grammar <tt>expr\<BT, argsM\<B0,...Bn,vararg\<V\> \> \></tt>
+ /// if \c BT is \c _ or \c AT, and if \c Ax matches \c Bx
+ /// for each \c x in <tt>[0,n)</tt> and if \c Ux matches \c V
+ /// for each \c x in <tt>[0,m)</tt>.
+ ///
+ /// For example:
+ ///
+ /// \code
+ /// // Match any function call expression, irregardless
+ /// // of the number of function arguments:
+ /// struct Function
+ /// : function< vararg<_> >
+ /// {};
+ /// \endcode
+ ///
+ /// When used as a transform, <tt>vararg\<G\></tt> applies
+ /// <tt>G</tt>'s transform.
             template<typename Grammar>
             struct vararg
               : Grammar

Modified: branches/fix-links/boost/xpressive/proto/proto.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/proto.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/proto.hpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -18,6 +18,7 @@
 #include <boost/xpressive/proto/expr.hpp>
 #include <boost/xpressive/proto/traits.hpp>
 #include <boost/xpressive/proto/domain.hpp>
+#include <boost/xpressive/proto/fusion.hpp>
 #include <boost/xpressive/proto/matches.hpp>
 #include <boost/xpressive/proto/extends.hpp>
 #include <boost/xpressive/proto/literal.hpp>

Modified: branches/fix-links/boost/xpressive/proto/transform/fold.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/transform/fold.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/transform/fold.hpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -200,9 +200,9 @@
               : fold<_reverse(Sequence), State, Fun>
             {};
 
- /// This specialization is only for improved compile-time performance
- /// in the commom case when the Sequence transform is \c proto::_.
- ///
+ // This specialization is only for improved compile-time performance
+ // in the commom case when the Sequence transform is \c proto::_.
+ //
             /// INTERNAL ONLY
             ///
             template<typename State0, typename Fun>
@@ -245,9 +245,9 @@
                 }
             };
 
- /// This specialization is only for improved compile-time performance
- /// in the commom case when the Sequence transform is \c proto::_.
- ///
+ // This specialization is only for improved compile-time performance
+ // in the commom case when the Sequence transform is \c proto::_.
+ //
             /// INTERNAL ONLY
             ///
             template<typename State0, typename Fun>

Modified: branches/fix-links/boost/xpressive/traits/cpp_regex_traits.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/traits/cpp_regex_traits.hpp (original)
+++ branches/fix-links/boost/xpressive/traits/cpp_regex_traits.hpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -119,6 +119,8 @@
     // Reserve some bits for the implementation
     #if defined(__GLIBCXX__)
     umaskex_t const std_ctype_reserved = 0x8000;
+ #elif defined(_CPPLIB_VER) && defined(BOOST_WINDOWS)
+ umaskex_t const std_ctype_reserved = 0x8200;
     #else
     umaskex_t const std_ctype_reserved = 0;
     #endif

Modified: branches/fix-links/libs/mpi/build/Jamfile.v2
==============================================================================
--- branches/fix-links/libs/mpi/build/Jamfile.v2 (original)
+++ branches/fix-links/libs/mpi/build/Jamfile.v2 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -82,6 +82,7 @@
         python/datatypes.cpp
         python/documentation.cpp
         python/py_environment.cpp
+ python/py_nonblocking.cpp
         python/py_exception.cpp
         python/module.cpp
         python/py_request.cpp

Modified: branches/fix-links/libs/mpi/build/__init__.py
==============================================================================
--- branches/fix-links/libs/mpi/build/__init__.py (original)
+++ branches/fix-links/libs/mpi/build/__init__.py 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -1,10 +1,10 @@
 import sys
 if sys.platform == 'linux2':
- import dl
+ import DLFCN as dl
     flags = sys.getdlopenflags()
     sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)
     import mpi
     sys.setdlopenflags(flags)
 else:
-import mpi
+ import mpi
 

Modified: branches/fix-links/libs/mpi/doc/mpi.qbk
==============================================================================
--- branches/fix-links/libs/mpi/doc/mpi.qbk (original)
+++ branches/fix-links/libs/mpi/doc/mpi.qbk 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -2025,6 +2025,9 @@
 
 [section:history Revision History]
 
+* *Boost 1.36.0*:
+ * Support for non-blocking operations in Python, from Andreas Klöckner
+
 * *Boost 1.35.0*: Initial release, containing the following post-review changes
   * Support for arrays in all collective operations
   * Support default-construction of [classref boost::mpi::environment environment]

Modified: branches/fix-links/libs/mpi/src/python/documentation.cpp
==============================================================================
--- branches/fix-links/libs/mpi/src/python/documentation.cpp (original)
+++ branches/fix-links/libs/mpi/src/python/documentation.cpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -132,10 +132,10 @@
   "\n"
   " Once you have registered your C++ data structures, you can extract\n"
   " the skeleton for an instance of that data structure with skeleton().\n"
- " The resulting skeleton_proxy can be transmitted via the normal send\n"
+ " The resulting SkeletonProxy can be transmitted via the normal send\n"
   " routine, e.g.,\n\n"
   " mpi.world.send(1, 0, skeleton(my_data_structure))\n\n"
- " skeleton_proxy objects can be received on the other end via recv(),\n"
+ " SkeletonProxy objects can be received on the other end via recv(),\n"
   " which stores a newly-created instance of your data structure with the\n"
   " same `shape' as the sender in its `object' attribute:\n\n"
   " shape = mpi.world.recv(0, 0)\n"
@@ -212,6 +212,86 @@
   "Determine if the MPI environment has already been finalized.\n";
 
 /***********************************************************
+ * nonblocking documentation *
+ ***********************************************************/
+const char* request_list_init_docstring=
+ "Without arguments, constructs an empty RequestList.\n"
+ "With one argument `iterable', copies request objects from this\n"
+ "iterable to the new RequestList.\n";
+
+const char* nonblocking_wait_any_docstring =
+ "Waits until any of the given requests has been completed. It provides\n"
+ "functionality equivalent to MPI_Waitany.\n"
+ "\n"
+ "requests must be a RequestList instance.\n"
+ "\n"
+ "Returns a triple (value, status, index) consisting of received value\n"
+ "(or None), the Status object for the completed request, and its index\n"
+ "in the RequestList.\n";
+
+const char* nonblocking_test_any_docstring =
+ "Tests if any of the given requests have been completed, but does not wait\n"
+ "for completion. It provides functionality equivalent to MPI_Testany.\n"
+ "\n"
+ "requests must be a RequestList instance.\n"
+ "\n"
+ "Returns a triple (value, status, index) like wait_any or None if no request\n"
+ "is complete.\n";
+
+const char* nonblocking_wait_all_docstring =
+ "Waits until all of the given requests have been completed. It provides\n"
+ "functionality equivalent to MPI_Waitall.\n"
+ "\n"
+ "requests must be a RequestList instance.\n"
+ "\n"
+ "If the second parameter `callable' is provided, it is called with each\n"
+ "completed request's received value (or None) and it s Status object as\n"
+ "its arguments. The calls occur in the order given by the `requests' list.\n";
+
+const char* nonblocking_test_all_docstring =
+ "Tests if all of the given requests have been completed. It provides\n"
+ "functionality equivalent to MPI_Testall.\n"
+ "\n"
+ "Returns True if all requests have been completed.\n"
+ "\n"
+ "requests must be a RequestList instance.\n"
+ "\n"
+ "If the second parameter `callable' is provided, it is called with each\n"
+ "completed request's received value (or None) and it s Status object as\n"
+ "its arguments. The calls occur in the order given by the `requests' list.\n";
+
+const char* nonblocking_wait_some_docstring =
+ "Waits until at least one of the given requests has completed. It\n"
+ "then completes all of the requests it can, partitioning the input\n"
+ "sequence into pending requests followed by completed requests.\n"
+ "\n"
+ "This routine provides functionality equivalent to MPI_Waitsome.\n"
+ "\n"
+ "Returns the index of the first completed request."
+ "\n"
+ "requests must be a RequestList instance.\n"
+ "\n"
+ "If the second parameter `callable' is provided, it is called with each\n"
+ "completed request's received value (or None) and it s Status object as\n"
+ "its arguments. The calls occur in the order given by the `requests' list.\n";
+
+const char* nonblocking_test_some_docstring =
+ "Tests to see if any of the given requests has completed. It completes\n"
+ "all of the requests it can, partitioning the input sequence into pending\n"
+ "requests followed by completed requests. This routine is similar to\n"
+ "wait_some, but does not wait until any requests have completed.\n"
+ "\n"
+ "This routine provides functionality equivalent to MPI_Testsome.\n"
+ "\n"
+ "Returns the index of the first completed request."
+ "\n"
+ "requests must be a RequestList instance.\n"
+ "\n"
+ "If the second parameter `callable' is provided, it is called with each\n"
+ "completed request's received value (or None) and it s Status object as\n"
+ "its arguments. The calls occur in the order given by the `requests' list.\n";
+
+/***********************************************************
  * exception documentation *
  ***********************************************************/
 const char* exception_docstring =
@@ -310,14 +390,14 @@
  * communicator documentation *
  ***********************************************************/
 const char* communicator_docstring =
- "The communicator class abstracts a set of communicating\n"
+ "The Communicator class abstracts a set of communicating\n"
  "processes in MPI. All of the processes that belong to a certain\n"
  "communicator can determine the size of the communicator, their rank\n"
  "within the communicator, and communicate with any other processes\n"
  "in the communicator.\n";
 
 const char* communicator_default_constructor_docstring =
- "Build a new Boost.MPI communicator for MPI_COMM_WORLD.\n";
+ "Build a new Boost.MPI Communicator instance for MPI_COMM_WORLD.\n";
 
 const char* communicator_rank_docstring =
   "Returns the rank of the process in the communicator, which will be a\n"
@@ -335,10 +415,10 @@
   " - For C++ objects registered via register_serialized(), the value\n"
   " will be serialized and transmitted.\n"
   "\n"
- " - For skeleton_proxy objects, the skeleton of the object will be\n"
+ " - For SkeletonProxy objects, the skeleton of the object will be\n"
   " serialized and transmitted.\n"
   "\n"
- " - For content objects, the content will be transmitted directly.\n"
+ " - For Content objects, the content will be transmitted directly.\n"
   " This content can be received by a matching recv/irecv call that\n"
   " provides a suitable `buffer' argument.\n"
   "\n"
@@ -351,12 +431,12 @@
   "the message can be received from any process. Likewise, if the tag\n"
   "parameter is not specified, a message with any tag can be received.\n"
   "If return_status is True, returns a tuple containing the received\n"
- "object followed by a status object describing the communication.\n"
+ "object followed by a Status object describing the communication.\n"
   "Otherwise, recv() returns just the received object.\n"
   "\n"
   "When receiving the content of a data type that has been sent separately\n"
   "from its skeleton, user code must provide a value for the `buffer'\n"
- "argument. This value should be the content object returned from\n"
+ "argument. This value should be the Content object returned from\n"
   "get_content().\n";
 
 const char* communicator_isend_docstring =
@@ -364,7 +444,7 @@
   "tag to the process with rank dest. It can be received by the\n"
   "destination process with a matching recv call. The value will be\n"
   "transmitted in the same way as with send().\n"
- "This routine returns a request object, which can be used to query\n"
+ "This routine returns a Request object, which can be used to query\n"
   "when the transmission has completed, wait for its completion, or\n"
   "cancel the transmission.\n";
 
@@ -373,15 +453,15 @@
   "source with the given tag. If the source parameter is not specified,\n"
   "the message can be received from any process. Likewise, if the tag\n"
   "parameter is not specified, a message with any tag can be received.\n"
- "This routine returns a request object, which can be used to query\n"
+ "This routine returns a Request object, which can be used to query\n"
   "when the transmission has completed, wait for its completion, or\n"
   "cancel the transmission. The received value be accessible\n"
- "through the `value' attribute of the request object once transmission\n"
+ "through the `value' attribute of the Request object once transmission\n"
   "has completed.\n"
   "\n"
   "As with the recv() routine, when receiving the content of a data type\n"
   "that has been sent separately from its skeleton, user code must provide\n"
- "a value for the `buffer' argument. This value should be the content\n"
+ "a value for the `buffer' argument. This value should be the Content\n"
   "object returned from get_content().\n";
 
  const char* communicator_probe_docstring =
@@ -389,7 +469,7 @@
   "is available to be received. It then returns information about\n"
   "that message. If source is omitted, a message from any process\n"
   "will match. If tag is omitted, a message with any tag will match.\n"
- "The actual source and tag can be retrieved from the returned status\n"
+ "The actual source and tag can be retrieved from the returned Status\n"
   "object. To check if a message is available without blocking, use\n"
   "iprobe.\n";
 
@@ -399,7 +479,7 @@
   "message; otherwise, it returns None. If source is omitted, a message\n"
   "from any process will match. If tag is omitted, a message with any\n"
   "tag will match. The actual source and tag can be retrieved from the\n"
- "returned status object. To wait for a message to become available, use\n"
+ "returned Status object. To wait for a message to become available, use\n"
   "probe.\n";
 
 const char* communicator_barrier_docstring =
@@ -418,8 +498,8 @@
   "the ordering of processes with the same color in the resulting\n"
   "communicator. If omitted, the key will default to the rank of\n"
   "the process in the current communicator.\n\n"
- "Returns a new communicator containing all of the processes in\n"
- "this communicator that have the same color.\n";
+ "Returns a new Communicator instance containing all of the \n"
+ "processes in this communicator that have the same color.\n";
 
 const char* communicator_abort_docstring =
   "Makes a \"best attempt\" to abort all of the tasks in the group of\n"
@@ -435,36 +515,46 @@
  * request documentation *
  ***********************************************************/
 const char* request_docstring =
- "The request class contains information about a non-blocking send\n"
+ "The Request class contains information about a non-blocking send\n"
   "or receive and will be returned from isend or irecv, respectively.\n"
- "When a request object represents a completed irecv, the `value' \n"
+ "When a Request object represents a completed irecv, the `value' \n"
   "attribute will contain the received value.\n";
 
+const char* request_with_value_docstring =
+ "This class is an implementation detail. Any call that accepts a\n"
+ "Request also accepts a RequestWithValue, and vice versa.\n";
+
 const char* request_wait_docstring =
   "Wait until the communication associated with this request has\n"
   "completed. For a request that is associated with an isend(), returns\n"
- "a status object describing the communication. For an irecv()\n"
+ "a Status object describing the communication. For an irecv()\n"
   "operation, returns the received value by default. However, when\n"
- "return_status=True, a (value, status) pair is returned by a.\n"
+ "return_status=True, a (value, status) pair is returned by a\n"
   "completed irecv request.\n";
 
 const char* request_test_docstring =
   "Determine whether the communication associated with this request\n"
- "has completed successfully. If so, returns the status object\n"
+ "has completed successfully. If so, returns the Status object\n"
   "describing the communication (for an isend request) or a tuple\n"
- "containing the received value and a status object (for an irecv\n"
- "request). Note that once test() returns a status object, the\n"
+ "containing the received value and a Status object (for an irecv\n"
+ "request). Note that once test() returns a Status object, the\n"
   "request has completed and wait() should not be called.\n";
 
 const char* request_cancel_docstring =
   "Cancel a pending communication, assuming it has not already been\n"
   "completed.\n";
 
+const char* request_value_docstring =
+ "If this request originated in an irecv(), this property makes the"
+ "sent value accessible once the request completes.\n"
+ "\n"
+ "If no value is available, ValueError is raised.\n";
+
 /***********************************************************
  * skeleton/content documentation *
  ***********************************************************/
 const char* object_without_skeleton_docstring =
- "The object_without_skeleton class is an exception class used only\n"
+ "The ObjectWithoutSkeleton class is an exception class used only\n"
   "when the skeleton() or get_content() function is called with an\n"
   "object that is not supported by the skeleton/content mechanism.\n"
   "All C++ types for which skeletons and content can be transmitted\n"
@@ -475,13 +565,13 @@
   "The object on which skeleton() or get_content() was invoked.\n";
 
 const char* skeleton_proxy_docstring =
- "The skeleton_proxy class is used to represent the skeleton of an\n"
- "object. The skeleton_proxy can be used as the value parameter of\n"
+ "The SkeletonProxy class is used to represent the skeleton of an\n"
+ "object. The SkeletonProxy can be used as the value parameter of\n"
   "send() or isend() operations, but instead of transmitting the\n"
   "entire object, only its skeleton (\"shape\") will be sent, without\n"
   "the actual data. Its content can then be transmitted, separately.\n"
   "\n"
- "User code cannot generate skeleton_proxy instances directly. To\n"
+ "User code cannot generate SkeletonProxy instances directly. To\n"
   "refer to the skeleton of an object, use skeleton(object). Skeletons\n"
   "can also be received with the recv() and irecv() methods.\n"
   "\n"
@@ -503,7 +593,7 @@
   "skeleton/content mechanism.\n";
 
 const char* skeleton_docstring =
- "The skeleton function retrieves the skeleton_proxy for its object\n"
+ "The skeleton function retrieves the SkeletonProxy for its object\n"
   "parameter, allowing the transmission of the skeleton (or \"shape\")\n"
   "of the object separately from its data. The skeleton/content mechanism\n"
   "is useful when a large data structure remains structurally the same\n"
@@ -534,7 +624,7 @@
  * status documentation *
  ***********************************************************/
 const char* status_docstring =
- "The status class stores information about a given message, including\n"
+ "The Status class stores information about a given message, including\n"
   "its source, tag, and whether the message transmission was cancelled\n"
   "or resulted in an error.\n";
 
@@ -554,7 +644,7 @@
  * timer documentation *
  ***********************************************************/
 const char* timer_docstring =
- "The timer class is a simple wrapper around the MPI timing facilities.\n";
+ "The Timer class is a simple wrapper around the MPI timing facilities.\n";
 
 const char* timer_default_constructor_docstring =
   "Initializes the timer. After this call, elapsed == 0.\n";

Modified: branches/fix-links/libs/mpi/src/python/module.cpp
==============================================================================
--- branches/fix-links/libs/mpi/src/python/module.cpp (original)
+++ branches/fix-links/libs/mpi/src/python/module.cpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -27,6 +27,7 @@
 extern void export_request();
 extern void export_status();
 extern void export_timer();
+extern void export_nonblocking();
 
 extern const char* module_docstring;
 
@@ -35,7 +36,7 @@
   // Setup module documentation
   scope().attr("__doc__") = module_docstring;
   scope().attr("__author__") = "Douglas Gregor <doug.gregor_at_[hidden]>";
- scope().attr("__date__") = "$LastChangedDate: 2006-07-16 15:25:47 -0400 (Sun, 16 Jul 2006) $";
+ scope().attr("__date__") = "$LastChangedDate$";
   scope().attr("__version__") = "$Revision$";
   scope().attr("__copyright__") = "Copyright (C) 2006 Douglas Gregor";
   scope().attr("__license__") = "http://www.boost.org/LICENSE_1_0.txt";
@@ -48,6 +49,7 @@
   export_request();
   export_status();
   export_timer();
+ export_nonblocking();
 }
 
 } } } // end namespace boost::mpi::python

Modified: branches/fix-links/libs/mpi/src/python/py_communicator.cpp
==============================================================================
--- branches/fix-links/libs/mpi/src/python/py_communicator.cpp (original)
+++ branches/fix-links/libs/mpi/src/python/py_communicator.cpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -14,6 +14,7 @@
 #include <boost/python.hpp>
 #include <boost/mpi.hpp>
 #include <boost/mpi/python/serialize.hpp>
+#include "request_with_value.hpp"
 
 using namespace boost::python;
 using namespace boost::mpi;
@@ -49,14 +50,12 @@
     return result;
 }
 
-object
+request_with_value
 communicator_irecv(const communicator& comm, int source, int tag)
 {
- using boost::python::make_tuple;
-
- object result;
- object req(comm.irecv(source, tag, result));
- req.attr("value") = result;
+ boost::shared_ptr<object> result(new object());
+ request_with_value req(comm.irecv(source, tag, *result));
+ req.m_internal_value = result;
   return req;
 }
 
@@ -76,7 +75,7 @@
   using boost::python::arg;
   using boost::python::object;
   
- class_<communicator> comm("communicator", communicator_docstring);
+ class_<communicator> comm("Communicator", communicator_docstring);
   comm
     .def(init<>())
     .add_property("rank", &communicator::rank, communicator_rank_docstring)

Modified: branches/fix-links/libs/mpi/src/python/py_exception.cpp
==============================================================================
--- branches/fix-links/libs/mpi/src/python/py_exception.cpp (original)
+++ branches/fix-links/libs/mpi/src/python/py_exception.cpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -30,9 +30,8 @@
 
 str exception_str(const exception& e)
 {
- return str("MPI routine `" + std::string(e.routine()) +
- "' returned error code " +
- lexical_cast<std::string>(e.result_code()));
+ return str(std::string(e.what()) +
+ " (code " + lexical_cast<std::string>(e.result_code())+")");
 }
 
 void export_exception()
@@ -42,10 +41,10 @@
   
   object type =
     class_<exception>
- ("exception", exception_docstring, no_init)
+ ("Exception", exception_docstring, no_init)
       .add_property("what", &exception::what, exception_what_docstring)
       .add_property("routine", &exception::what, exception_routine_docstring)
- .add_property("result_code", &exception::what,
+ .add_property("result_code", &exception::result_code,
                     exception_result_code_docstring)
       .def("__str__", &exception_str)
     ;

Modified: branches/fix-links/libs/mpi/src/python/py_request.cpp
==============================================================================
--- branches/fix-links/libs/mpi/src/python/py_request.cpp (original)
+++ branches/fix-links/libs/mpi/src/python/py_request.cpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -13,52 +13,90 @@
  */
 #include <boost/python.hpp>
 #include <boost/mpi.hpp>
+#include "request_with_value.hpp"
 
 using namespace boost::python;
 using namespace boost::mpi;
 
-namespace boost { namespace mpi { namespace python {
-
-extern const char* request_docstring;
-extern const char* request_wait_docstring;
-extern const char* request_test_docstring;
-extern const char* request_cancel_docstring;
+const object python::request_with_value::get_value() const
+{
+ if (m_internal_value.get())
+ return *m_internal_value;
+ else if (m_external_value)
+ return *m_external_value;
+ else
+ {
+ PyErr_SetString(PyExc_ValueError, "request value not available");
+ throw boost::python::error_already_set();
+ }
+}
 
-object request_wait(object req_obj)
+const object python::request_with_value::get_value_or_none() const
 {
- request& req = extract<request&>(req_obj)();
- status stat = req.wait();
- if (PyObject_HasAttrString(req_obj.ptr(), "value"))
- return boost::python::make_tuple(stat, req_obj.attr("value"));
+ if (m_internal_value.get())
+ return *m_internal_value;
+ else if (m_external_value)
+ return *m_external_value;
   else
- return object(stat);
+ return object();
 }
 
-object request_test(object req_obj)
+const object python::request_with_value::wrap_wait()
 {
- request& req = extract<request&>(req_obj)();
+ status stat = request::wait();
+ if (m_internal_value.get() || m_external_value)
+ return boost::python::make_tuple(get_value(), stat);
+ else
+ return object(stat);
+}
 
- if (optional<status> stat = req.test())
- {
- if (PyObject_HasAttrString(req_obj.ptr(), "value"))
- return boost::python::make_tuple(stat, req_obj.attr("value"));
- else
- return object(stat);
- }
+const object python::request_with_value::wrap_test()
+{
+ ::boost::optional<status> stat = request::test();
+ if (stat)
+ {
+ if (m_internal_value.get() || m_external_value)
+ return boost::python::make_tuple(get_value(), *stat);
+ else
+ return object(*stat);
+ }
   else
     return object();
 }
 
+
+namespace boost { namespace mpi { namespace python {
+
+extern const char* request_docstring;
+extern const char* request_with_value_docstring;
+extern const char* request_wait_docstring;
+extern const char* request_test_docstring;
+extern const char* request_cancel_docstring;
+extern const char* request_value_docstring;
+
 void export_request()
 {
   using boost::python::arg;
   using boost::python::object;
   
- class_<request>("request", request_docstring, no_init)
- .def("wait", &request_wait, request_wait_docstring)
- .def("test", &request_test, request_test_docstring)
- .def("cancel", &request::cancel, request_cancel_docstring)
- ;
+ {
+ typedef request cl;
+ class_<cl>("Request", request_docstring, no_init)
+ .def("wait", &cl::wait, request_wait_docstring)
+ .def("test", &cl::test, request_test_docstring)
+ .def("cancel", &cl::cancel, request_cancel_docstring)
+ ;
+ }
+ {
+ typedef request_with_value cl;
+ class_<cl, bases<request> >(
+ "RequestWithValue", request_with_value_docstring, no_init)
+ .def("wait", &cl::wrap_wait, request_wait_docstring)
+ .def("test", &cl::wrap_test, request_test_docstring)
+ ;
+ }
+
+ implicitly_convertible<request, request_with_value>();
 }
 
 } } } // end namespace boost::mpi::python

Modified: branches/fix-links/libs/mpi/src/python/py_timer.cpp
==============================================================================
--- branches/fix-links/libs/mpi/src/python/py_timer.cpp (original)
+++ branches/fix-links/libs/mpi/src/python/py_timer.cpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -32,7 +32,7 @@
   using boost::python::arg;
   using boost::python::object;
   
- class_<timer>("timer", timer_docstring)
+ class_<timer>("Timer", timer_docstring)
     .def(init<>())
     .def("restart", &timer::restart, timer_restart_docstring)
     .add_property("elapsed", &timer::elapsed, timer_elapsed_docstring)

Modified: branches/fix-links/libs/mpi/src/python/skeleton_and_content.cpp
==============================================================================
--- branches/fix-links/libs/mpi/src/python/skeleton_and_content.cpp (original)
+++ branches/fix-links/libs/mpi/src/python/skeleton_and_content.cpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -16,6 +16,7 @@
 #include <typeinfo>
 #include <list>
 #include "utility.hpp"
+#include "request_with_value.hpp"
 
 using namespace boost::python;
 using namespace boost::mpi;
@@ -114,14 +115,12 @@
 /// Receive the content of a Python object. The request object's value
 /// attribute will reference the object whose content is being
 /// received, not the content wrapper.
-object
+request_with_value
 communicator_irecv_content(const communicator& comm, int source, int tag,
- const content& c)
+ content& c)
 {
- using boost::python::make_tuple;
-
- object req(comm.irecv(source, tag, c.base()));
- req.attr("value") = c.object;
+ request_with_value req(comm.irecv(source, tag, c.base()));
+ req.m_external_value = &c.object;
   return req;
 }
 
@@ -140,7 +139,7 @@
   // Expose the object_without_skeleton exception
   object type =
     class_<object_without_skeleton>
- ("object_without_skeleton", object_without_skeleton_docstring, no_init)
+ ("ObjectWithoutSkeleton", object_without_skeleton_docstring, no_init)
       .def_readonly("object", &object_without_skeleton::value,
                     object_without_skeleton_object_docstring)
       .def("__str__", &object_without_skeleton_str)
@@ -150,11 +149,11 @@
   // Expose the Python variants of "skeleton_proxy" and "content", and
   // their generator functions.
   detail::skeleton_proxy_base_type =
- class_<skeleton_proxy_base>("skeleton_proxy", skeleton_proxy_docstring,
+ class_<skeleton_proxy_base>("SkeletonProxy", skeleton_proxy_docstring,
                                 no_init)
       .def_readonly("object", &skeleton_proxy_base::object,
                     skeleton_proxy_object_docstring);
- class_<content>("content", content_docstring, no_init);
+ class_<content>("Content", content_docstring, no_init);
   def("skeleton", &skeleton, arg("object"), skeleton_docstring);
   def("get_content", &get_content, arg("object"), get_content_docstring);
 
@@ -166,7 +165,9 @@
          (arg("source") = any_source, arg("tag") = any_tag, arg("buffer"),
           arg("return_status") = false))
     .def("irecv", communicator_irecv_content,
- (arg("source") = any_source, arg("tag") = any_tag, arg("buffer")));
+ (arg("source") = any_source, arg("tag") = any_tag, arg("buffer")),
+ with_custodian_and_ward_postcall<0, 4>()
+ );
 }
 
 } } } // end namespace boost::mpi::python

Modified: branches/fix-links/libs/mpi/src/python/status.cpp
==============================================================================
--- branches/fix-links/libs/mpi/src/python/status.cpp (original)
+++ branches/fix-links/libs/mpi/src/python/status.cpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -30,7 +30,7 @@
   using boost::python::arg;
   using boost::python::object;
   
- class_<status>("status", status_docstring, no_init)
+ class_<status>("Status", status_docstring, no_init)
     .add_property("source", &status::source, status_source_docstring)
     .add_property("tag", &status::tag, status_tag_docstring)
     .add_property("error", &status::error, status_error_docstring)

Modified: branches/fix-links/libs/program_options/src/cmdline.cpp
==============================================================================
--- branches/fix-links/libs/program_options/src/cmdline.cpp (original)
+++ branches/fix-links/libs/program_options/src/cmdline.cpp 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -98,10 +98,10 @@
     {
 #if defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
         vector<string> args;
- copy(argv+1, argv+argc, inserter(args, args.end()));
+ copy(argv+1, argv+argc+!argc, inserter(args, args.end()));
         init(args);
 #else
- init(vector<string>(argv+1, argv+argc));
+ init(vector<string>(argv+1, argv+argc+!argc));
 #endif
     }
 

Modified: branches/fix-links/libs/xpressive/proto/doc/construction.qbk
==============================================================================
--- branches/fix-links/libs/xpressive/proto/doc/construction.qbk (original)
+++ branches/fix-links/libs/xpressive/proto/doc/construction.qbk 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -141,7 +141,179 @@
 [section:left_right_arg Accessing Children Nodes]
 [/==============================================]
 
-// TODO describe tag_of, arg, arg_c, left and right. Also Fusion compatibility.
+After assembling an expression into a tree, you'll naturally want to be
+able to do the reverse, and access its children.
+You may even want to be able to iterate over the children with algorithms
+from the Boost.Fusion library. This section shows how.
+
+[heading [^tag_of<>]]
+
+A node in an expression tree is nothing more than a collection of children
+nodes and a tag type. You can access the tag type of any Proto expression type
+`Expr` directly as `typename Expr::proto_tag`, or you can use the _tag_of_
+metafunction, as shown below:
+
+ template<typename Expr>
+ typename proto::result_of::tag_of<Expr>::type
+ get_tag_of(Expr const &)
+ {
+ // Tag types are required to be default-constructible
+ return typename proto::result_of::tag_of<Expr>::type();
+ }
+
+ proto::terminal<int>::type const i = {0};
+
+ // Addition nodes have the "plus" tag type:
+ proto::tag::plus plus_tag = get_tag_of( i + 2 );
+
+[heading [^arg_c()]]
+
+Each node in an expression tree corresponds to an operator in an expression,
+and the children correspond to the operands, or arguments of the operator.
+To access them, you can use the _arg_c_ function template, as demonstrated
+below:
+
+ proto::terminal<int>::type i = {0};
+
+ // Get the 0-th operand of an addition operation:
+ proto::terminal<int>::type &ri = proto::arg_c<0>( i + 2 );
+
+ // Assert that we got back what we put in:
+ assert( &i == &ri );
+
+You can use the `result_of::arg_c<>` metafunction to get the type of the Nth
+child of an expression node. The nested `::type` of the `arg_c<>` metafunction
+gives you the type after references and cv-qualifiers have been stripped from
+the child's type.
+
+ template<typename Expr>
+ void test_result_of_arg_c(Expr const &expr)
+ {
+ typedef typename proto::result_of::arg_c<Expr, 0>::type type;
+
+ // ::type is a non-cv qualified, non-reference
+ BOOST_MPL_ASSERT((is_same< type, terminal<int>::type>));
+ }
+
+ // ...
+ terminal<int>::type i = {0};
+ test_result_of_arg_c( i + 2 );
+
+Why does the `arg_c<>` metafunction strip cv-qualifiers and references? The
+reason is one of practicality. Because expression trees are most typically
+built by holding references to temporary objects, lifetime management of these
+children nodes can be problematic. If `arg_c<>::type` were a reference, it
+would be very simple to create dangling references. Avoiding dangling
+references results in tedious and verbose applications of `remove_reference<>`
+and `remove_const<>`. This is especially problematic when building transforms
+that operate on ephemeral constelations of temporary objects. The current
+behavior of the `arg_c<>` metafunction makes it much simpler to write correct
+code.
+
+If you would like to know exactly the type of the Nth argument, including
+references and cv-qualifiers, you can use
+`fusion::result_of::value_at<Expr, N>::type`. This way, you can tell whether
+a child is stored by value or by reference. And if you would like to know
+the exact type that _arg_c_ returns, you can use
+`fusion::result_of::at_c<Expr, N>::type`. It will always be a reference type,
+and its cv-qualification depends on the cv-qualification of `Expr` and
+whether the child is stored by reference or not.
+
+[heading [^arg()], [^left()], and [^right()]]
+
+Most operators in C++ are unary or binary. For that reason, accesing the
+only operand, or the left and right operands, are very common operations. For
+this reason, Proto provides the _arg_, _left_, and _right_ functions. _arg_
+and _left_ are synonomous with `arg_c<0>()`, and _right_ is synonomous with
+`arg_c<1>()`.
+
+There are also `result_of::arg<>`, `result_of::left<>`, and `result_of::right<>`
+metafunctions that merely forward to their `result_of::arg_c<>` counterparts.
+
+[heading Expression Nodes as Fusion Sequences]
+
+Proto expression nodes are valid Fusion random-access sequences of their
+children nodes. That means you can apply Fusion algorithms to them,
+transform them, apply Fusion filters and views to them, and access their
+elements using `fusion::at()`. The things Fusion can do to heterogeneous
+sequences is beyond the scope of this users' guide, but here is an example:
+
+ struct display
+ {
+ template<typename T>
+ void operator()(T const &t) const
+ {
+ std::cout << t << std::endl;
+ }
+ };
+
+ struct fun_t {};
+ terminal<fun_t>::type const fun = {{}};
+
+ // ...
+ fusion::for_each(
+ fusion::transform(
+ // pop_front() removes the "fun" child
+ fusion::pop_front(fun(1,2,3,4))
+ // Extract the ints from the terminal nodes
+ , functional::arg<>()
+ )
+ , display()
+ );
+
+The above invocation of `fusion::for_each()` displays the following:
+
+[pre
+1
+2
+3
+4
+]
+
+[heading Flattening Proto Expression Tress]
+
+Imagine a slight variation of the above example where, instead of iterating
+over the arguments of a lazy function invocation, we would like to iterate
+over the terminals in an addition expression:
+
+ terminal<int>::type const _1 = {1};
+
+ // ERROR: this doesn't work! Why?
+ fusion::for_each(
+ fusion::transform(
+ _1 + 2 + 3 + 4
+ , functional::arg<>()
+ )
+ , display()
+ );
+
+The reason this doesn't work is because the expression `_1 + 2 + 3 + 4` does
+not describe a flat sequence of terminals --- it describes a binary tree. We
+can treat it as a flat sequence of terminals, however, using Proto's _flatten_
+function. _flatten_ returns a view which makes a tree appear as a flat Fusion
+sequence. If the top-most node has a tag type `T`, then the elements of the
+flattened sequence are the children nodes that do *not* have tag type `T`. This
+process is evaluated recursively. So the above can correctly be written as:
+
+ terminal<int>::type const _1 = {1};
+
+ // OK, iterate over a flattened view
+ fusion::for_each(
+ fusion::transform(
+ proto::flatten(_1 + 2 + 3 + 4)
+ , functional::arg<>()
+ )
+ , display()
+ );
+
+The above invocation of `fusion::for_each()` displays the following:
+
+[pre
+1
+2
+3
+4
+]
 
 [endsect]
 

Modified: branches/fix-links/libs/xpressive/proto/doc/proto.qbk
==============================================================================
--- branches/fix-links/libs/xpressive/proto/doc/proto.qbk (original)
+++ branches/fix-links/libs/xpressive/proto/doc/proto.qbk 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -71,6 +71,7 @@
 [def _callable_context_ [classref boost::proto::context::callable_context `callable_context<>`]]
 [def _null_context_ [classref boost::proto::context::null_context `null_context<>`]]
 [def _when_ [classref boost::proto::transform::when `when<>`]]
+[def _flatten_ [funcref boost::proto::flatten `flatten()`]]
 
 [include preface.qbk]
 

Modified: branches/fix-links/libs/xpressive/proto/doc/protodoc.xml
==============================================================================
--- branches/fix-links/libs/xpressive/proto/doc/protodoc.xml (original)
+++ branches/fix-links/libs/xpressive/proto/doc/protodoc.xml 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -297,7 +297,7 @@
     </template><specialization><template-arg>This(Expr</template-arg><template-arg>Context)</template-arg></specialization><typedef name="type"><type><classname>proto::result_of::eval</classname>&lt; typename remove_reference&lt; Expr &gt;::type, typename remove_reference&lt; Context &gt;::type &gt;::type</type></typedef></struct-specialization><typedef name="proto_is_callable_"><type>void</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>proto::result_of::eval</classname>&lt; Expr, Context &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="Context"/>
- </template><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="context"><paramtype>Context &amp;</paramtype></parameter><purpose>Evaluate a given Proto expression with a given context. </purpose><description><para>
+ </template><parameter name="expr"><paramtype>Expr &amp;</paramtype><description><para>The Proto expression to evaluate </para></description></parameter><parameter name="context"><paramtype>Context &amp;</paramtype><description><para>The context in which the expression should be evaluated. </para></description></parameter><purpose>Evaluate a given Proto expression with a given context. </purpose><description><para>
 
 </para></description><returns><para><computeroutput>typename Context::template eval&lt;Expr&gt;()(expr, context)</computeroutput> </para></returns></method><method name="operator()" cv="const"><type><classname>proto::result_of::eval</classname>&lt; Expr, Context &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
@@ -924,7 +924,7 @@
           <template-type-parameter name="B4"/>
         </template><parameter name="b0"><paramtype>const B0 &amp;</paramtype></parameter><parameter name="b1"><paramtype>const B1 &amp;</paramtype></parameter><parameter name="b2"><paramtype>const B2 &amp;</paramtype></parameter><parameter name="b3"><paramtype>const B3 &amp;</paramtype></parameter><parameter name="b4"><paramtype>const B4 &amp;</paramtype></parameter></signature><description><para>make_expr </para></description></overloaded-function></namespace></namespace></header><header name="boost/xpressive/proto/matches.hpp"><para>Contains definition of matches&lt;&gt; metafunction for determining if a given expression matches a given pattern. </para><namespace name="boost"><namespace name="proto"><namespace name="control"><struct name="not_"><template>
       <template-type-parameter name="Grammar"/>
- </template><struct-specialization name="result"><template>
+ </template><purpose>Inverts the set of expressions matched by a grammar. When used as a transform, <computeroutput>not_&lt;&gt;</computeroutput> returns the current expression unchanged. </purpose><description><para>If an expression type <computeroutput>E</computeroutput> does not match a grammar <computeroutput>G</computeroutput>, then <computeroutput>E</computeroutput> does match <computeroutput>not_&lt;G&gt;</computeroutput>. For example, <computeroutput>not_&lt;terminal&lt;_&gt; &gt;</computeroutput> will match any non-terminal. </para></description><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
@@ -935,11 +935,32 @@
           <template-type-parameter name="Visitor"/>
         </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>An expression </para></description></parameter><parameter name=""><paramtype>State const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor &amp;</paramtype></parameter><description><para>
 
-</para></description><returns><para>expr </para></returns></method></method-group></struct><struct name="if_"><template>
+
+</para></description><requires><para><computeroutput>matches&lt;Expr,not_&gt;::value</computeroutput> is <computeroutput>true</computeroutput>. </para></requires><returns><para><computeroutput>expr</computeroutput> </para></returns></method></method-group></struct><struct name="if_"><template>
       <template-type-parameter name="If"/>
       <template-type-parameter name="Then"/>
       <template-type-parameter name="Else"/>
- </template><struct-specialization name="result"><template>
+ </template><purpose>Used to select one grammar or another based on the result of a compile-time Boolean. When used as a transform, <computeroutput>if_&lt;&gt;</computeroutput> selects between two transforms based on a compile-time Boolean. </purpose><description><para>When <computeroutput>if_&lt;If,Then,Else&gt;</computeroutput> is used as a grammar, <computeroutput>If</computeroutput> must be a Proto transform and <computeroutput>Then</computeroutput> and <computeroutput>Else</computeroutput> must be grammars. An expression type <computeroutput>E</computeroutput> matches <computeroutput>if_&lt;If,Then,Else&gt;</computeroutput> if <computeroutput>when&lt;_,If&gt;::result&lt;void(E,int,int)&gt;::type::value</computeroutput> is <computeroutput>true</computeroutput> and <computeroutput>E</computeroutput> matches <computeroutput>U</computeroutput>; or, if <computeroutput>when&lt;_,If&gt;::result&lt;void(E,int,int)&gt;::type::value</computeroutput> is <computeroutput>false</computeroutput> and <computeroutpu
t>E</computeroutput> matches <computeroutput>V</computeroutput>.</para><para>The template parameter <computeroutput>Then</computeroutput> defaults to <computeroutput>_</computeroutput> and <computeroutput>Else</computeroutput> defaults to <computeroutput>not&lt;_&gt;</computeroutput>, so an expression type <computeroutput>E</computeroutput> will match <computeroutput>if_&lt;If&gt;</computeroutput> if and only if <computeroutput>when&lt;_,If&gt;::result&lt;void(E,int,int)&gt;::type::value</computeroutput> is <computeroutput>true</computeroutput>.</para><para><programlisting> // A grammar that only matches integral terminals,
+ // using is_integral&lt;&gt; from Boost.Type_traits.
+ struct IsIntegral
+ : and_&lt;
+ terminal&lt;_&gt;
+ , if_&lt; is_integral&lt;_arg&gt;() &gt;
+ &gt;
+ {};
+</programlisting></para><para>When <computeroutput>if_&lt;If,Then,Else&gt;</computeroutput> is used as a transform, <computeroutput>If</computeroutput>, <computeroutput>Then</computeroutput> and <computeroutput>Else</computeroutput> must be Proto transforms. When applying the transform to an expression <computeroutput>E</computeroutput>, state <computeroutput>S</computeroutput> and visitor <computeroutput>V</computeroutput>, if <computeroutput>when&lt;_,If&gt;::result&lt;void(E,S,V)&gt;::type::value</computeroutput> is <computeroutput>true</computeroutput> then the <computeroutput>Then</computeroutput> transform is applied; otherwise the <computeroutput>Else</computeroutput> transform is applied.</para><para><programlisting> // Match a terminal. If the terminal is integral, return
+ // mpl::true_; otherwise, return mpl::false_.
+ struct IsIntegral2
+ : when&lt;
+ terminal&lt;_&gt;
+ , if_&lt;
+ is_integral&lt;_arg&gt;()
+ , mpl::true_()
+ , mpl::false_()
+ &gt;
+ &gt;
+ {};
+</programlisting> </para></description><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
@@ -950,7 +971,7 @@
           <template-type-parameter name="Visitor"/>
         </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>An expression </para></description></parameter><parameter name="state"><paramtype>State const &amp;</paramtype><description><para>The current state </para></description></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype><description><para>A visitor of arbitrary type </para></description></parameter><description><para>
 
-</para></description><returns><para>result&lt;void(Expr, State, Visitor)&gt;which()(expr, state, visitor) </para></returns></method></method-group></struct><struct name="or_"><template>
+</para></description><returns><para><computeroutput>result&lt;void(Expr, State, Visitor)&gt;::which()(expr, state, visitor)</computeroutput> </para></returns></method></method-group></struct><struct name="or_"><template>
       <template-type-parameter name="G0"/>
       <template-type-parameter name="G1"/>
       <template-type-parameter name="G2"/>
@@ -959,7 +980,7 @@
       <template-type-parameter name="G5"/>
       <template-type-parameter name="G6"/>
       <template-type-parameter name="G7"/>
- </template><struct-specialization name="result"><template>
+ </template><purpose>For matching one of a set of alternate grammars. Alternates tried in order to avoid ambiguity. When used as a transform, <computeroutput>or_&lt;&gt;</computeroutput> applies the transform associated with the first grammar that matches the expression. </purpose><description><para>An expression type <computeroutput>E</computeroutput> matches <computeroutput>or_&lt;B0,B1,...Bn&gt;</computeroutput> if <computeroutput>E</computeroutput> matches any <computeroutput>Bx</computeroutput> for <computeroutput>x</computeroutput> in <computeroutput>[0,n)</computeroutput>.</para><para>When applying <computeroutput>or_&lt;B0,B1,...Bn&gt;</computeroutput> as a transform with an expression <computeroutput>e</computeroutput> of type <computeroutput>E</computeroutput>, state <computeroutput>s</computeroutput> and visitor <computeroutput>v</computeroutput>, it is equivalent to <computeroutput>Bx()(e, s, v)</computeroutput>, where <computeroutput>x</computeroutput> is the lowest number such that <compute
routput>matches&lt;E,Bx&gt;::value</computeroutput> is <computeroutput>true</computeroutput>. </para></description><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
@@ -970,7 +991,8 @@
           <template-type-parameter name="Visitor"/>
         </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>An expression </para></description></parameter><parameter name="state"><paramtype>State const &amp;</paramtype><description><para>The current state </para></description></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype><description><para>A visitor of arbitrary type </para></description></parameter><description><para>
 
-</para></description><returns><para>result&lt;void(Expr, State, Visitor)&gt;which()(expr, state, visitor) </para></returns></method></method-group></struct><struct name="and_"><template>
+
+</para></description><requires><para><computeroutput>matches&lt;Expr,or_&gt;::value</computeroutput> is <computeroutput>true</computeroutput>. </para></requires><returns><para><computeroutput>result&lt;void(Expr, State, Visitor)&gt;::which()(expr, state, visitor)</computeroutput> </para></returns></method></method-group></struct><struct name="and_"><template>
       <template-type-parameter name="G0"/>
       <template-type-parameter name="G1"/>
       <template-type-parameter name="G2"/>
@@ -979,7 +1001,7 @@
       <template-type-parameter name="G5"/>
       <template-type-parameter name="G6"/>
       <template-type-parameter name="G7"/>
- </template><struct-specialization name="result"><template>
+ </template><purpose>For matching all of a set of grammars. When used as a transform, <computeroutput>and_&lt;&gt;</computeroutput> applies the transform associated with the last grammar in the set. </purpose><description><para>An expression type <computeroutput>E</computeroutput> matches <computeroutput>and_&lt;B0,B1,...Bn&gt;</computeroutput> if <computeroutput>E</computeroutput> matches all <computeroutput>Bx</computeroutput> for <computeroutput>x</computeroutput> in <computeroutput>[0,n)</computeroutput>.</para><para>When applying <computeroutput>and_&lt;B0,B1,...Bn&gt;</computeroutput> as a transform with an expression <computeroutput>e</computeroutput>, state <computeroutput>s</computeroutput> and visitor <computeroutput>v</computeroutput>, it is equivalent to <computeroutput>Bn()(e, s, v)</computeroutput>. </para></description><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
@@ -990,9 +1012,11 @@
           <template-type-parameter name="Visitor"/>
         </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>An expression </para></description></parameter><parameter name="state"><paramtype>State const &amp;</paramtype><description><para>The current state </para></description></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype><description><para>A visitor of arbitrary type </para></description></parameter><description><para>
 
-</para></description><returns><para>result&lt;void(Expr, State, Visitor)&gt;which()(expr, state, visitor) </para></returns></method></method-group></struct><struct name="switch_"><template>
+
+</para></description><requires><para><computeroutput>matches&lt;Expr,and_&gt;::value</computeroutput> is <computeroutput>true</computeroutput>. </para></requires><returns><para><computeroutput>result&lt;void(Expr, State, Visitor)&gt;::which()(expr, state, visitor)</computeroutput> </para></returns></method></method-group></struct><struct name="switch_"><template>
       <template-type-parameter name="Cases"/>
- </template><struct-specialization name="result"><template>
+ </template><purpose>For matching one of a set of alternate grammars, which are looked up based on an expression's tag type. When used as a transform, <computeroutput>switch_&lt;&gt;</computeroutput> applies the transform associated with the grammar that matches the expression. </purpose><description><para>
+An expression type <computeroutput>E</computeroutput> matches <computeroutput>switch_&lt;C&gt;</computeroutput> if <computeroutput>E</computeroutput> matches <computeroutput>C::case_&lt;E::proto_tag&gt;</computeroutput>.</para><para>When applying <computeroutput>switch_&lt;C&gt;</computeroutput> as a transform with an expression <computeroutput>e</computeroutput> of type <computeroutput>E</computeroutput>, state <computeroutput>s</computeroutput> and visitor <computeroutput>v</computeroutput>, it is equivalent to <computeroutput>C::case_&lt;E::proto_tag&gt;()(e, s, v)</computeroutput>. </para></description><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
@@ -1003,23 +1027,29 @@
           <template-type-parameter name="Visitor"/>
         </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>An expression </para></description></parameter><parameter name="state"><paramtype>State const &amp;</paramtype><description><para>The current state </para></description></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype><description><para>A visitor of arbitrary type </para></description></parameter><description><para>
 
-</para></description><returns><para>result&lt;void(Expr, State, Visitor)&gt;which()(expr, state, visitor) </para></returns></method></method-group></struct><struct name="exact"><template>
+
+</para></description><requires><para><computeroutput>matches&lt;Expr,switch_&gt;::value</computeroutput> is <computeroutput>true</computeroutput>. </para></requires><returns><para><computeroutput>result&lt;void(Expr, State, Visitor)&gt;::which()(expr, state, visitor)</computeroutput> </para></returns></method></method-group></struct><struct name="exact"><template>
       <template-type-parameter name="T"/>
- </template></struct><struct name="convertible_to"><template>
+ </template><purpose>For forcing exact matches of terminal types. </purpose><description><para>By default, matching terminals ignores references and cv-qualifiers. For instance, a terminal expression of type <computeroutput>terminal&lt;int const &amp;&gt;type</computeroutput> will match the grammar <computeroutput>terminal&lt;int&gt;</computeroutput>. If that is not desired, you can force an exact match with <computeroutput>terminal&lt;exact&lt;int&gt; &gt;</computeroutput>. This will only match integer terminals where the terminal is held by value. </para></description></struct><struct name="convertible_to"><template>
       <template-type-parameter name="T"/>
- </template></struct><struct name="vararg"><template>
+ </template><purpose>For matching terminals that are convertible to a type. </purpose><description><para>Use <computeroutput>convertible_to&lt;&gt;</computeroutput> to match a terminal that is convertible to some type. For example, the grammar <computeroutput>terminal&lt;convertible_to&lt;int&gt; &gt;</computeroutput> will match any terminal whose argument is convertible to an integer.</para><para>
+</para></description></struct><struct name="vararg"><template>
       <template-type-parameter name="Grammar"/>
- </template><typedef name="proto_is_vararg_"><type>void</type></typedef></struct></namespace><namespace name="result_of"><struct name="matches"><template>
+ </template><purpose>For matching a Grammar to a variable number of sub-expressions. </purpose><description><para>An expression type <computeroutput>expr&lt;AT, argsN&lt;A0,...An,U0,...Um&gt; &gt;</computeroutput> matches a grammar <computeroutput>expr&lt;BT, argsM&lt;B0,...Bn,vararg&lt;V&gt; &gt; &gt;</computeroutput> if <computeroutput>BT</computeroutput> is <computeroutput>_</computeroutput> or <computeroutput>AT</computeroutput>, and if <computeroutput>Ax</computeroutput> matches <computeroutput>Bx</computeroutput> for each <computeroutput>x</computeroutput> in <computeroutput>[0,n)</computeroutput> and if <computeroutput>Ux</computeroutput> matches <computeroutput>V</computeroutput> for each <computeroutput>x</computeroutput> in <computeroutput>[0,m)</computeroutput>.</para><para>For example:</para><para><programlisting> // Match any function call expression, irregardless
+ // of the number of function arguments:
+ struct Function
+ : function&lt; vararg&lt;_&gt; &gt;
+ {};
+</programlisting></para><para>When used as a transform, <computeroutput>vararg&lt;G&gt;</computeroutput> applies <computeroutput>G</computeroutput>'s transform. </para></description><typedef name="proto_is_vararg_"><type>void</type></typedef></struct></namespace><namespace name="result_of"><struct name="matches"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Grammar"/>
- </template><purpose>A Boolean metafunction that evaluates whether a given expression type matches a a grammar. </purpose><description><para><computeroutput>matches&lt;Expr,Grammar&gt;</computeroutput> inherits (indirectly) from <computeroutput>mpl::true_</computeroutput> if <computeroutput>Expr::proto_base_expr</computeroutput> matches <computeroutput>Grammar::proto_base_expr</computeroutput>, and from <computeroutput>mpl::false_</computeroutput> otherwise.</para><para>Non-terminal expressions are matched against a grammar according to the following rules:</para><para><itemizedlist>
+ </template><purpose>A Boolean metafunction that evaluates whether a given expression type matches a grammar. </purpose><description><para><computeroutput>matches&lt;Expr,Grammar&gt;</computeroutput> inherits (indirectly) from <computeroutput>mpl::true_</computeroutput> if <computeroutput>Expr::proto_base_expr</computeroutput> matches <computeroutput>Grammar::proto_base_expr</computeroutput>, and from <computeroutput>mpl::false_</computeroutput> otherwise.</para><para>Non-terminal expressions are matched against a grammar according to the following rules:</para><para><itemizedlist>
 <listitem><para>The wildcard pattern, <computeroutput>_</computeroutput>, matches any expression. </para></listitem>
 <listitem><para>An expression <computeroutput>expr&lt;AT, argsN&lt;A0,A1,...An&gt; &gt;</computeroutput> matches a grammar <computeroutput>expr&lt;BT, argsN&lt;B0,B1,...Bn&gt; &gt;</computeroutput> if <computeroutput>BT</computeroutput> is <computeroutput>_</computeroutput> or <computeroutput>AT</computeroutput>, and if <computeroutput>Ax</computeroutput> matches <computeroutput>Bx</computeroutput> for each <computeroutput>x</computeroutput> in <computeroutput>[0,n)</computeroutput>. </para></listitem>
 <listitem><para>An expression <computeroutput>expr&lt;AT, argsN&lt;A0,...An,U0,...Um&gt; &gt;</computeroutput> matches a grammar <computeroutput>expr&lt;BT, argsM&lt;B0,...Bn,vararg&lt;V&gt; &gt; &gt;</computeroutput> if <computeroutput>BT</computeroutput> is <computeroutput>_</computeroutput> or <computeroutput>AT</computeroutput>, and if <computeroutput>Ax</computeroutput> matches <computeroutput>Bx</computeroutput> for each <computeroutput>x</computeroutput> in <computeroutput>[0,n)</computeroutput> and if <computeroutput>Ux</computeroutput> matches <computeroutput>V</computeroutput> for each <computeroutput>x</computeroutput> in <computeroutput>[0,m)</computeroutput>. </para></listitem>
 <listitem><para>An expression <computeroutput>E</computeroutput> matches <computeroutput>or_&lt;B0,B1,...Bn&gt;</computeroutput> if <computeroutput>E</computeroutput> matches some <computeroutput>Bx</computeroutput> for <computeroutput>x</computeroutput> in <computeroutput>[0,n)</computeroutput>. </para></listitem>
 <listitem><para>An expression <computeroutput>E</computeroutput> matches <computeroutput>and_&lt;B0,B1,...Bn&gt;</computeroutput> if <computeroutput>E</computeroutput> matches all <computeroutput>Bx</computeroutput> for <computeroutput>x</computeroutput> in <computeroutput>[0,n)</computeroutput>. </para></listitem>
-<listitem><para>An expression <computeroutput>E</computeroutput> matches <computeroutput>if_&lt;T&gt;</computeroutput> if <computeroutput>when&lt;_,T&gt;result&lt;void(E,int,int)&gt;type::value</computeroutput> is <computeroutput>true</computeroutput>. </para></listitem>
-<listitem><para>An expression <computeroutput>E</computeroutput> matches <computeroutput>if_&lt;T,U,V&gt;</computeroutput> if <computeroutput>when&lt;_,T&gt;result&lt;void(E,int,int)&gt;type::value</computeroutput> is <computeroutput>true</computeroutput> and matches <computeroutput>U</computeroutput>; or, if <computeroutput>when&lt;_,T&gt;result&lt;void(E,int,int)&gt;type::value</computeroutput> is <computeroutput>false</computeroutput> and matches <computeroutput>V</computeroutput>. </para></listitem>
+<listitem><para>An expression <computeroutput>E</computeroutput> matches <computeroutput>if_&lt;T,U,V&gt;</computeroutput> if <computeroutput>when&lt;_,T&gt;::result&lt;void(E,int,int)&gt;::type::value</computeroutput> is <computeroutput>true</computeroutput> and <computeroutput>E</computeroutput> matches <computeroutput>U</computeroutput>; or, if <computeroutput>when&lt;_,T&gt;::result&lt;void(E,int,int)&gt;::type::value</computeroutput> is <computeroutput>false</computeroutput> and <computeroutput>E</computeroutput> matches <computeroutput>V</computeroutput>. (Note: <computeroutput>U</computeroutput> defaults to <computeroutput>_</computeroutput> and <computeroutput>V</computeroutput> defaults to <computeroutput>not&lt;_&gt;</computeroutput>.) </para></listitem>
 <listitem><para>An expression <computeroutput>E</computeroutput> matches <computeroutput>not_&lt;T&gt;</computeroutput> if <computeroutput>E</computeroutput> does not match <computeroutput>T</computeroutput>. </para></listitem>
 <listitem><para>An expression <computeroutput>E</computeroutput> matches <computeroutput>switch_&lt;C&gt;</computeroutput> if <computeroutput>E</computeroutput> matches <computeroutput>C::case_&lt;E::proto_tag&gt;</computeroutput>.</para></listitem>
 </itemizedlist>
@@ -1029,18 +1059,38 @@
 <listitem><para><computeroutput>A</computeroutput> is <computeroutput>B &amp;</computeroutput> </para></listitem>
 <listitem><para><computeroutput>A</computeroutput> is <computeroutput>B const &amp;</computeroutput> </para></listitem>
 <listitem><para><computeroutput>B</computeroutput> is <computeroutput>exact&lt;A&gt;</computeroutput> </para></listitem>
-<listitem><para><computeroutput>B</computeroutput> is <computeroutput>convertible_to&lt;X&gt;</computeroutput> and <computeroutput>is_convertible&lt;A,X&gt;value</computeroutput> is <computeroutput>true</computeroutput>. </para></listitem>
+<listitem><para><computeroutput>B</computeroutput> is <computeroutput>convertible_to&lt;X&gt;</computeroutput> and <computeroutput>is_convertible&lt;A,X&gt;::value</computeroutput> is <computeroutput>true</computeroutput>. </para></listitem>
 <listitem><para><computeroutput>A</computeroutput> is <computeroutput>X[M]</computeroutput> or <computeroutput>X(&amp;)[M]</computeroutput> and <computeroutput>B</computeroutput> is <computeroutput>X[proto::N]</computeroutput>. </para></listitem>
 <listitem><para><computeroutput>A</computeroutput> is <computeroutput>X(&amp;)[M]</computeroutput> and <computeroutput>B</computeroutput> is <computeroutput>X(&amp;)[proto::N]</computeroutput>. </para></listitem>
 <listitem><para><computeroutput>A</computeroutput> is <computeroutput>X[M]</computeroutput> or <computeroutput>X(&amp;)[M]</computeroutput> and <computeroutput>B</computeroutput> is <computeroutput>X*</computeroutput>. </para></listitem>
 <listitem><para><computeroutput>B</computeroutput> lambda-matches <computeroutput>A</computeroutput> (see below).</para></listitem>
 </itemizedlist>
-A type <computeroutput>B</computeroutput> lambda-matches <computeroutput>A</computeroutput> one of the following is true:</para><para><itemizedlist>
+A type <computeroutput>B</computeroutput> lambda-matches <computeroutput>A</computeroutput> if one of the following is true:</para><para><itemizedlist>
 <listitem><para><computeroutput>B</computeroutput> is <computeroutput>A</computeroutput> </para></listitem>
 <listitem><para><computeroutput>B</computeroutput> is the wildcard pattern, <computeroutput>_</computeroutput> </para></listitem>
 <listitem><para><computeroutput>B</computeroutput> is <computeroutput>T&lt;B0,B1,...Bn&gt;</computeroutput> and <computeroutput>A</computeroutput> is <computeroutput>T&lt;A0,A1,...An&gt;</computeroutput> and for each <computeroutput>x</computeroutput> in <computeroutput>[0,n)</computeroutput>, <computeroutput>Ax</computeroutput> and <computeroutput>Bx</computeroutput> are types such that <computeroutput>Ax</computeroutput> lambda-matches <computeroutput>Bx</computeroutput> </para></listitem>
 </itemizedlist>
-</para></description></struct></namespace><namespace name="wildcardns_"><struct name="_"><struct-specialization name="result"><template>
+</para></description></struct></namespace><namespace name="wildcardns_"><struct name="_"><purpose>A wildcard grammar element that matches any expression, and a transform that returns the current expression unchanged. </purpose><description><para>The wildcard type, <computeroutput>_</computeroutput>, is a grammar element such that <computeroutput>matches&lt;E,_&gt;::value</computeroutput> is <computeroutput>true</computeroutput> for any expression type <computeroutput>E</computeroutput>.</para><para>The wildcard can also be used as a stand-in for a template argument when matching terminals. For instance, the following is a grammar that will match any <computeroutput>std::complex&lt;&gt;</computeroutput> terminal:</para><para><programlisting> BOOST_MPL_ASSERT((
+ matches&lt;
+ terminal&lt;std::complex&lt;double&gt; &gt;::type
+ , terminal&lt;std::complex&lt; _ &gt; &gt;
+ &gt;
+ ));
+</programlisting></para><para>When used as a transform, <computeroutput>_</computeroutput> returns the current expression unchanged. For instance, in the following, <computeroutput>_</computeroutput> is used with the <computeroutput>fold&lt;&gt;</computeroutput> transform to fold the children of a node:</para><para><programlisting> struct CountChildren
+ : or_&lt;
+ // Terminals have no children
+ when&lt;terminal&lt;_&gt;, mpl::int_&lt;0&gt;()&gt;
+ // Use fold&lt;&gt; to count the children of non-terminals
+ , otherwise&lt;
+ fold&lt;
+ _ // &lt;-- fold the current expression
+ , mpl::int_&lt;0&gt;()
+ , mpl::plus&lt;_state, mpl::int_&lt;1&gt; &gt;()
+ &gt;
+ &gt;
+ &gt;
+ {};
+</programlisting> </para></description><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
@@ -1051,7 +1101,7 @@
           <template-type-parameter name="Visitor"/>
         </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>An expression </para></description></parameter><parameter name=""><paramtype>State const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor &amp;</paramtype></parameter><description><para>
 
-</para></description><returns><para>expr </para></returns></method></method-group></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/operators.hpp"><para>Contains all the overloaded operators that make it possible to build Proto expression trees. </para><namespace name="boost"><namespace name="proto"><struct name="is_extension"><template>
+</para></description><returns><para><computeroutput>expr</computeroutput> </para></returns></method></method-group></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/operators.hpp"><para>Contains all the overloaded operators that make it possible to build Proto expression trees. </para><namespace name="boost"><namespace name="proto"><struct name="is_extension"><template>
       <template-type-parameter name="T"/>
     </template><inherit access="public">boost::mpl::false_</inherit></struct><namespace name="exprns_"><function name="operator+"><type><emphasis>unspecified</emphasis></type><template>
           <template-type-parameter name="Arg"/>
@@ -2068,31 +2118,7 @@
       <template-type-parameter name="Sequence"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Fun"/>
- </template><inherit access="public">boost::proto::transform::fold&lt; Sequence, State0, Fun &gt;</inherit></struct><struct-specialization name="fold"><template>
- <template-type-parameter name="State0"/>
- <template-type-parameter name="Fun"/>
- </template><specialization><template-arg>_</template-arg><template-arg>State0</template-arg><template-arg>Fun</template-arg></specialization><description><para>This specialization is only for improved compile-time performance in the commom case when the Sequence transform is <computeroutput>proto::_</computeroutput>.</para><para>INTERNAL ONLY </para></description><struct-specialization name="result"><template>
- <template-type-parameter name="This"/>
- <template-type-parameter name="Expr"/>
- <template-type-parameter name="State"/>
- <template-type-parameter name="Visitor"/>
- </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
- <template-type-parameter name="Expr"/>
- <template-type-parameter name="State"/>
- <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="reverse_fold"><template>
- <template-type-parameter name="State0"/>
- <template-type-parameter name="Fun"/>
- </template><specialization><template-arg>_</template-arg><template-arg>State0</template-arg><template-arg>Fun</template-arg></specialization><description><para>This specialization is only for improved compile-time performance in the commom case when the Sequence transform is <computeroutput>proto::_</computeroutput>.</para><para>INTERNAL ONLY </para></description><struct-specialization name="result"><template>
- <template-type-parameter name="This"/>
- <template-type-parameter name="Expr"/>
- <template-type-parameter name="State"/>
- <template-type-parameter name="Visitor"/>
- </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
- <template-type-parameter name="Expr"/>
- <template-type-parameter name="State"/>
- <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization></namespace></namespace></namespace></header><header name="boost/xpressive/proto/transform/fold_tree.hpp"><namespace name="boost"><namespace name="proto"><namespace name="transform"><struct name="fold_tree"><template>
+ </template><inherit access="public">boost::proto::transform::fold&lt; Sequence, State0, Fun &gt;</inherit></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/transform/fold_tree.hpp"><namespace name="boost"><namespace name="proto"><namespace name="transform"><struct name="fold_tree"><template>
       <template-type-parameter name="Sequence"/>
       <template-type-parameter name="State0"/>
       <template-type-parameter name="Fun"/>

Modified: branches/fix-links/tools/build/v2/tools/intel-darwin.jam
==============================================================================
--- branches/fix-links/tools/build/v2/tools/intel-darwin.jam (original)
+++ branches/fix-links/tools/build/v2/tools/intel-darwin.jam 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -85,14 +85,7 @@
 
     local major = $(m) ;
     
- if $(major) = "8" {
- flags intel-darwin.compile OPTIONS $(condition)/<inlining>off : -Ob0 ;
- flags intel-darwin.compile OPTIONS $(condition)/<inlining>on : -Ob1 ;
- flags intel-darwin.compile OPTIONS $(condition)/<inlining>full : -Ob2 ;
- flags intel-darwin.link OPTIONS $(condition)/<runtime-link>static : -static -static-libcxa -lstdc++ -lpthread ;
- flags intel-darwin.link OPTIONS $(condition)/<runtime-link>shared : -shared-libcxa -lstdc++ -lpthread ;
- }
- else if $(major) = "9" {
+ if $(major) = "9" {
       flags intel-darwin.compile OPTIONS $(condition)/<inlining>off : -Ob0 ;
       flags intel-darwin.compile OPTIONS $(condition)/<inlining>on : -Ob1 ;
       flags intel-darwin.compile OPTIONS $(condition)/<inlining>full : -Ob2 ;
@@ -207,5 +200,5 @@
 
 actions link.dll bind LIBRARIES
 {
- "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" -dynamiclib -install_name "$(<[1]:D=)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
+ "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" -single_module -dynamiclib -install_name "$(<[1]:D=)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
 }

Modified: branches/fix-links/tools/build/v2/tools/mpi.jam
==============================================================================
--- branches/fix-links/tools/build/v2/tools/mpi.jam (original)
+++ branches/fix-links/tools/build/v2/tools/mpi.jam 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -271,6 +271,12 @@
       command = [ common.get-invocation-command mpi : mpiCC ] ;
     }
 
+ if ! $(mpicxx) && ! $(command)
+ {
+ # Try "mpicxx", which is used by OpenMPI and MPICH2
+ command = [ common.get-invocation-command mpi : mpicxx ] ;
+ }
+
     local result ;
     local compile_flags ;
     local link_flags ;

Modified: branches/fix-links/tools/inspect/index.html
==============================================================================
--- branches/fix-links/tools/inspect/index.html (original)
+++ branches/fix-links/tools/inspect/index.html 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -51,4 +51,4 @@
 
 </body>
 
-</html>
\ No newline at end of file
+</html>

Modified: branches/fix-links/tools/jam/src/execunix.c
==============================================================================
--- branches/fix-links/tools/jam/src/execunix.c (original)
+++ branches/fix-links/tools/jam/src/execunix.c 2008-02-10 10:26:54 EST (Sun, 10 Feb 2008)
@@ -25,6 +25,10 @@
 # ifdef USE_EXECUNIX
 # include <sys/times.h>
 
+# if defined(__APPLE__) && defined(__ppc__)
+# define NO_VFORK
+# endif
+
 # ifdef NO_VFORK
 # define vfork() fork()
 # endif
@@ -211,6 +215,8 @@
 
         if ((cmdtab[slot].pid = vfork()) == 0)
            {
+ int pid = getpid();
+
             close(out[0]);
             close(err[0]);
 
@@ -239,17 +245,19 @@
                 r_limit.rlim_max = globs.timeout;
                 setrlimit(RLIMIT_CPU, &r_limit);
             }
- setpgid(cmdtab[slot].pid, cmdtab[slot].pid);
-
- execvp( argv[0], argv );
- _exit(127);
- }
+ setpgid(pid,pid);
+ execvp( argv[0], argv );
+ perror( "execvp" );
+ _exit(127);
+ }
         else if( cmdtab[slot].pid == -1 )
         {
             perror( "vfork" );
             exit( EXITBAD );
         }
 
+ setpgid(cmdtab[slot].pid, cmdtab[slot].pid);
+
         /* close write end of pipes */
         close(out[1]);
         close(err[1]);
@@ -458,7 +466,7 @@
                 if (FD_ISSET(cmdtab[i].fd[OUT], &fds))
                     out = read_descriptor(i, OUT);
 
- if (FD_ISSET(cmdtab[i].fd[ERR], &fds))
+ if ((globs.pipe_action != 0) && (FD_ISSET(cmdtab[i].fd[ERR], &fds)))
                     err = read_descriptor(i, ERR);
 
                 /* if feof on either descriptor, then we're done */


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk