Boost logo

Boost-Commit :

From: eric_at_[hidden]
Date: 2008-01-18 02:56:32


Author: eric_niebler
Date: 2008-01-18 02:56:31 EST (Fri, 18 Jan 2008)
New Revision: 42839
URL: http://svn.boost.org/trac/boost/changeset/42839

Log:
tweaks for better doxygen-ated output
Text files modified:
   trunk/boost/xpressive/proto/context/default.hpp | 4 ++--
   trunk/boost/xpressive/proto/debug.hpp | 2 +-
   trunk/boost/xpressive/proto/fusion.hpp | 12 ++++++------
   trunk/boost/xpressive/proto/make_expr.hpp | 16 ++++++++--------
   trunk/boost/xpressive/proto/ref.hpp | 2 +-
   trunk/boost/xpressive/proto/traits.hpp | 12 ++++++------
   trunk/boost/xpressive/proto/transform/fold_tree.hpp | 39 +++++++++++++++++++--------------------
   7 files changed, 43 insertions(+), 44 deletions(-)

Modified: trunk/boost/xpressive/proto/context/default.hpp
==============================================================================
--- trunk/boost/xpressive/proto/context/default.hpp (original)
+++ trunk/boost/xpressive/proto/context/default.hpp 2008-01-18 02:56:31 EST (Fri, 18 Jan 2008)
@@ -30,6 +30,8 @@
     #include <boost/xpressive/proto/traits.hpp> // for proto::arg_c()
     #include <boost/xpressive/proto/detail/suffix.hpp> // must be last include
 
+ namespace boost { namespace proto
+ {
     // If we're generating doxygen documentation, hide all the nasty
     // Boost.Typeof gunk.
     #ifndef BOOST_PROTO_DOXYGEN_INVOKED
@@ -61,8 +63,6 @@
     ///
     #define UNREF(x) typename boost::remove_reference<x>::type
 
- namespace boost { namespace proto
- {
         namespace detail
         {
             template<typename T> T make();

Modified: trunk/boost/xpressive/proto/debug.hpp
==============================================================================
--- trunk/boost/xpressive/proto/debug.hpp (original)
+++ trunk/boost/xpressive/proto/debug.hpp 2008-01-18 02:56:31 EST (Fri, 18 Jan 2008)
@@ -20,7 +20,7 @@
 #include <boost/xpressive/proto/expr.hpp>
 #include <boost/xpressive/proto/traits.hpp>
 #else
-/// INTERNAL ONLY
+/// INTERNAL <> ONLY
 /// Needed to work around doxygen bug
 struct a_dummy_global;
 #endif

Modified: trunk/boost/xpressive/proto/fusion.hpp
==============================================================================
--- trunk/boost/xpressive/proto/fusion.hpp (original)
+++ trunk/boost/xpressive/proto/fusion.hpp 2008-01-18 02:56:31 EST (Fri, 18 Jan 2008)
@@ -30,13 +30,13 @@
 #include <boost/xpressive/proto/eval.hpp>
 #include <boost/xpressive/proto/detail/suffix.hpp>
 
-/// INTERNAL ONLY
-///
-#define UNREF(x) typename boost::remove_reference<x>::type
-
 namespace boost { namespace proto
 {
 
+/// INTERNAL MACRO
+///
+#define UNREF(x) typename boost::remove_reference<x>::type
+
     namespace detail
     {
 
@@ -156,7 +156,7 @@
         {}
 
         template<typename Sig>
- struct result {};
+ struct result;
 
         template<typename This, typename Expr>
         struct result<This(Expr)>
@@ -411,7 +411,7 @@
         struct as_element
         {
             template<typename Sig>
- struct result {};
+ struct result;
 
             template<typename This, typename Expr>
             struct result<This(Expr)>

Modified: trunk/boost/xpressive/proto/make_expr.hpp
==============================================================================
--- trunk/boost/xpressive/proto/make_expr.hpp (original)
+++ trunk/boost/xpressive/proto/make_expr.hpp 2008-01-18 02:56:31 EST (Fri, 18 Jan 2008)
@@ -77,6 +77,14 @@
     #endif
     #include <boost/xpressive/proto/detail/suffix.hpp>
 
+ namespace boost { namespace fusion
+ {
+ template<typename Function>
+ class unfused_generic;
+ }}
+
+ namespace boost { namespace proto
+ {
     /// INTERNAL ONLY
     ///
     #define BOOST_PROTO_AS_ARG_TYPE(Z, N, DATA) \
@@ -332,14 +340,6 @@
         ) \
         /**/
 
- namespace boost { namespace fusion
- {
- template<typename Function>
- class unfused_generic;
- }}
-
- namespace boost { namespace proto
- {
         namespace detail
         {
             template<

Modified: trunk/boost/xpressive/proto/ref.hpp
==============================================================================
--- trunk/boost/xpressive/proto/ref.hpp (original)
+++ trunk/boost/xpressive/proto/ref.hpp 2008-01-18 02:56:31 EST (Fri, 18 Jan 2008)
@@ -137,7 +137,7 @@
         struct unref
         {
             template<typename T>
- struct result {};
+ struct result;
 
             template<typename This, typename T>
             struct result<This(T)>

Modified: trunk/boost/xpressive/proto/traits.hpp
==============================================================================
--- trunk/boost/xpressive/proto/traits.hpp (original)
+++ trunk/boost/xpressive/proto/traits.hpp 2008-01-18 02:56:31 EST (Fri, 18 Jan 2008)
@@ -388,7 +388,7 @@
             struct as_expr
             {
                 template<typename Sig>
- struct result {};
+ struct result;
 
                 template<typename This, typename T>
                 struct result<This(T)>
@@ -430,7 +430,7 @@
             struct as_arg
             {
                 template<typename Sig>
- struct result {};
+ struct result;
 
                 template<typename This, typename T>
                 struct result<This(T)>
@@ -456,7 +456,7 @@
             struct arg_c
             {
                 template<typename Sig>
- struct result {};
+ struct result;
 
                 template<typename This, typename Expr>
                 struct result<This(Expr)>
@@ -480,7 +480,7 @@
             struct arg
             {
                 template<typename Sig>
- struct result {};
+ struct result;
 
                 template<typename This, typename Expr>
                 struct result<This(Expr)>
@@ -503,7 +503,7 @@
             struct left
             {
                 template<typename Sig>
- struct result {};
+ struct result;
 
                 template<typename This, typename Expr>
                 struct result<This(Expr)>
@@ -526,7 +526,7 @@
             struct right
             {
                 template<typename Sig>
- struct result {};
+ struct result;
 
                 template<typename This, typename Expr>
                 struct result<This(Expr)>

Modified: trunk/boost/xpressive/proto/transform/fold_tree.hpp
==============================================================================
--- trunk/boost/xpressive/proto/transform/fold_tree.hpp (original)
+++ trunk/boost/xpressive/proto/transform/fold_tree.hpp 2008-01-18 02:56:31 EST (Fri, 18 Jan 2008)
@@ -10,34 +10,39 @@
 #define BOOST_PROTO_TRANSFORM_FOLD_TREE_HPP_EAN_11_05_2007
 
 #include <boost/xpressive/proto/detail/prefix.hpp>
+#include <boost/type_traits/is_same.hpp>
 #include <boost/xpressive/proto/proto_fwd.hpp>
 #include <boost/xpressive/proto/traits.hpp>
+#include <boost/xpressive/proto/matches.hpp>
 #include <boost/xpressive/proto/transform/fold.hpp>
 #include <boost/xpressive/proto/detail/suffix.hpp>
 
 namespace boost { namespace proto
 {
-
     namespace transform
     {
-
         namespace detail
         {
+ template<typename Tag>
+ struct is_tag : callable
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename This, typename Expr, typename State, typename Visitor>
+ struct result<This(Expr, State, Visitor)>
+ : is_same<Tag, typename Expr::proto_tag>
+ {};
+ };
 
- template<typename Grammar, typename Fun>
+ template<typename Tag, typename Fun>
             struct fold_tree_
- : or_<
- when<Grammar, fold<_, _state, fold_tree_<Grammar, Fun> > >
- , when<_, Fun>
- >
+ : if_<is_tag<Tag>, fold<_, _state, fold_tree_<Tag, Fun> >, Fun>
             {};
 
- template<typename Grammar, typename Fun>
+ template<typename Tag, typename Fun>
             struct reverse_fold_tree_
- : or_<
- when<Grammar, reverse_fold<_, _state, reverse_fold_tree_<Grammar, Fun> > >
- , when<_, Fun>
- >
+ : if_<is_tag<Tag>, reverse_fold<_, _state, reverse_fold_tree_<Tag, Fun> >, Fun>
             {};
         }
 
@@ -54,10 +59,7 @@
                 typedef fold<
                     Sequence
                   , State0
- , detail::fold_tree_<
- nary_expr<typename Expr::proto_tag, vararg<_> >
- , Fun
- >
+ , detail::fold_tree_<typename Expr::proto_tag, Fun>
> impl;
 
                 typedef typename impl::template result<void(Expr, State, Visitor)>::type type;
@@ -85,10 +87,7 @@
                 typedef reverse_fold<
                     Sequence
                   , State0
- , detail::reverse_fold_tree_<
- nary_expr<typename Expr::proto_tag, vararg<_> >
- , Fun
- >
+ , detail::reverse_fold_tree_<typename Expr::proto_tag, Fun>
> impl;
 
                 typedef typename impl::template result<void(Expr, State, Visitor)>::type type;


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