|
Boost-Commit : |
From: eric_at_[hidden]
Date: 2008-06-27 18:04:53
Author: eric_niebler
Date: 2008-06-27 18:04:52 EDT (Fri, 27 Jun 2008)
New Revision: 46794
URL: http://svn.boost.org/trac/boost/changeset/46794
Log:
minor tweaks
Text files modified:
branches/proto/v4/boost/proto/deep_copy.hpp | 2 +-
branches/proto/v4/boost/proto/detail/poly_function.hpp | 25 ++++++++++++++++++++++---
branches/proto/v4/boost/proto/traits.hpp | 5 +++--
3 files changed, 26 insertions(+), 6 deletions(-)
Modified: branches/proto/v4/boost/proto/deep_copy.hpp
==============================================================================
--- branches/proto/v4/boost/proto/deep_copy.hpp (original)
+++ branches/proto/v4/boost/proto/deep_copy.hpp 2008-06-27 18:04:52 EDT (Fri, 27 Jun 2008)
@@ -46,7 +46,7 @@
template<typename Expr2>
static type call(Expr2 const &expr)
{
- return typename Expr::proto_domain()(expr_type::make(proto::value(expr)));
+ return typename Expr::proto_domain()(expr_type::make(expr.proto_base().child0));
}
};
}
Modified: branches/proto/v4/boost/proto/detail/poly_function.hpp
==============================================================================
--- branches/proto/v4/boost/proto/detail/poly_function.hpp (original)
+++ branches/proto/v4/boost/proto/detail/poly_function.hpp 2008-06-27 18:04:52 EDT (Fri, 27 Jun 2008)
@@ -80,7 +80,7 @@
arg(type t)
: value(t)
{}
-
+
operator type() const
{
return this->value;
@@ -158,15 +158,22 @@
return impl();
}
- #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, BOOST_PROTO_MAX_ARITY, <boost/proto/detail/poly_function.hpp>))
+ #define BOOST_PP_ITERATION_PARAMS_1 (4, (1, BOOST_PROTO_MAX_ARITY, <boost/proto/detail/poly_function.hpp>, 0))
#include BOOST_PP_ITERATE()
};
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ template<typename PolyFunSig>
+ struct as_mono_function;
+
+ #define BOOST_PP_ITERATION_PARAMS_1 (4, (1, BOOST_PROTO_MAX_ARITY, <boost/proto/detail/poly_function.hpp>, 1))
+ #include BOOST_PP_ITERATE()
+
}}} // namespace boost::proto::detail
#endif
-#else
+#elif 0 == BOOST_PP_ITERATION_FLAGS()
#define N BOOST_PP_ITERATION()
@@ -206,4 +213,16 @@
#undef N
+#elif 1 == BOOST_PP_ITERATION_FLAGS()
+
+ #define N BOOST_PP_ITERATION()
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ template<typename PolyFun, BOOST_PP_ENUM_PARAMS(N, typename A)>
+ struct as_mono_function<PolyFun(BOOST_PP_ENUM_PARAMS(N, A))>
+ : PolyFun::template impl<BOOST_PP_ENUM_PARAMS(N, A)>
+ {};
+
+ #undef N
+
#endif
Modified: branches/proto/v4/boost/proto/traits.hpp
==============================================================================
--- branches/proto/v4/boost/proto/traits.hpp (original)
+++ branches/proto/v4/boost/proto/traits.hpp 2008-06-27 18:04:52 EDT (Fri, 27 Jun 2008)
@@ -319,7 +319,7 @@
/// INTERNAL ONLY
///
template<typename T2>
- static reference call(T2 &t)
+ static T2 &call(T2 &t)
{
return t;
}
@@ -510,7 +510,8 @@
/// <tt>result_of::right\<Expr\></tt> is equivalent to
/// <tt>result_of::child_c\<Expr, 1\></tt>.
template<typename Expr>
- struct right : child_c<Expr, 1>
+ struct right
+ : child_c<Expr, 1>
{};
} // namespace result_of
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