|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53591 - in branches/release: . boost/fusion/container/vector/detail boost/fusion/support/detail boost/proto boost/proto/context boost/proto/detail boost/proto/transform boost/xpressive boost/xpressive/detail/core boost/xpressive/detail/core/matcher boost/xpressive/detail/static boost/xpressive/detail/static/transforms boost/xpressive/detail/utility libs/proto/doc libs/proto/doc/reference libs/proto/doc/reference/concepts libs/proto/doc/reference/transform libs/proto/test
From: eric_at_[hidden]
Date: 2009-06-03 00:32:36
Author: eric_niebler
Date: 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
New Revision: 53591
URL: http://svn.boost.org/trac/boost/changeset/53591
Log:
Merged revisions 53158,53182,53334,53337,53419,53421,53521,53566-53568,53578,53590 via svnmerge from
https://svn.boost.org/svn/boost/trunk
Added:
branches/release/libs/proto/doc/reference/concepts/BasicPrimitiveTransform.xml
- copied unchanged from r53578, /trunk/libs/proto/doc/reference/concepts/BasicPrimitiveTransform.xml
branches/release/libs/proto/test/mem_ptr.cpp
- copied unchanged from r53334, /trunk/libs/proto/test/mem_ptr.cpp
Properties modified:
branches/release/ (props changed)
Text files modified:
branches/release/boost/fusion/container/vector/detail/at_impl.hpp | 21 +
branches/release/boost/fusion/container/vector/detail/vector_n_chooser.hpp | 52 ++----
branches/release/boost/fusion/support/detail/access.hpp | 37 ++-
branches/release/boost/proto/context/callable.hpp | 7
branches/release/boost/proto/context/default.hpp | 21 +-
branches/release/boost/proto/deep_copy.hpp | 1
branches/release/boost/proto/detail/decltype.hpp | 222 +++++++++++++++-----------
branches/release/boost/proto/detail/funop.hpp | 1
branches/release/boost/proto/detail/poly_function.hpp | 40 ++++
branches/release/boost/proto/expr.hpp | 113 ++++++++-----
branches/release/boost/proto/extends.hpp | 12 +
branches/release/boost/proto/fusion.hpp | 4
branches/release/boost/proto/generate.hpp | 12 +
branches/release/boost/proto/literal.hpp | 4
branches/release/boost/proto/make_expr.hpp | 10
branches/release/boost/proto/operators.hpp | 54 +++---
branches/release/boost/proto/proto_fwd.hpp | 24 ++
branches/release/boost/proto/traits.hpp | 319 +++++++++++++++++++--------------------
branches/release/boost/proto/transform/call.hpp | 25 +-
branches/release/boost/proto/transform/default.hpp | 20 +-
branches/release/boost/proto/transform/impl.hpp | 153 +++++++++---------
branches/release/boost/proto/transform/make.hpp | 12 +
branches/release/boost/proto/transform/pass_through.hpp | 1
branches/release/boost/xpressive/detail/core/linker.hpp | 4
branches/release/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp | 2
branches/release/boost/xpressive/detail/core/state.hpp | 4
branches/release/boost/xpressive/detail/core/sub_match_impl.hpp | 15 +
branches/release/boost/xpressive/detail/static/grammar.hpp | 4
branches/release/boost/xpressive/detail/static/transforms/as_action.hpp | 4
branches/release/boost/xpressive/detail/static/transforms/as_set.hpp | 4
branches/release/boost/xpressive/detail/static/transmogrify.hpp | 4
branches/release/boost/xpressive/detail/static/width_of.hpp | 4
branches/release/boost/xpressive/detail/utility/sequence_stack.hpp | 18 -
branches/release/boost/xpressive/match_results.hpp | 2
branches/release/boost/xpressive/regex_actions.hpp | 12
branches/release/libs/proto/doc/reference.xml | 1
branches/release/libs/proto/doc/reference/concepts/PrimitiveTransform.xml | 14 -
branches/release/libs/proto/doc/reference/traits.xml | 145 ++++++------------
branches/release/libs/proto/doc/reference/transform/when.xml | 2
branches/release/libs/proto/test/Jamfile.v2 | 1
branches/release/libs/proto/test/toy_spirit.cpp | 10
41 files changed, 747 insertions(+), 668 deletions(-)
Modified: branches/release/boost/fusion/container/vector/detail/at_impl.hpp
==============================================================================
--- branches/release/boost/fusion/container/vector/detail/at_impl.hpp (original)
+++ branches/release/boost/fusion/container/vector/detail/at_impl.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -28,13 +28,7 @@
struct apply
{
typedef mpl::at<typename Sequence::types, N> element;
- typedef typename
- mpl::eval_if<
- is_const<Sequence>
- , detail::cref_result<element>
- , detail::ref_result<element>
- >::type
- type;
+ typedef typename detail::ref_result<element>::type type;
static type
call(Sequence& v)
@@ -42,6 +36,19 @@
return v.at_impl(N());
}
};
+
+ template <typename Sequence, typename N>
+ struct apply <Sequence const, N>
+ {
+ typedef mpl::at<typename Sequence::types, N> element;
+ typedef typename detail::cref_result<element>::type type;
+
+ static type
+ call(Sequence const& v)
+ {
+ return v.at_impl(N());
+ }
+ };
};
}
}}
Modified: branches/release/boost/fusion/container/vector/detail/vector_n_chooser.hpp
==============================================================================
--- branches/release/boost/fusion/container/vector/detail/vector_n_chooser.hpp (original)
+++ branches/release/boost/fusion/container/vector/detail/vector_n_chooser.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -25,11 +25,12 @@
#include <boost/fusion/container/vector/vector50.hpp>
#endif
-#include <boost/mpl/distance.hpp>
-#include <boost/mpl/find.hpp>
-#include <boost/mpl/begin_end.hpp>
#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/arithmetic/sub.hpp>
+#include <boost/preprocessor/facilities/intercept.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
namespace boost { namespace fusion
{
@@ -38,40 +39,23 @@
namespace boost { namespace fusion { namespace detail
{
- template <int N>
- struct get_vector_n;
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
+ struct vector_n_chooser
+ {
+ typedef BOOST_PP_CAT(vector, FUSION_MAX_VECTOR_SIZE)<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)> type;
+ };
template <>
- struct get_vector_n<0>
+ struct vector_n_chooser<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, void_ BOOST_PP_INTERCEPT)>
{
- template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
- struct call
- {
- typedef vector0 type;
- };
+ typedef vector0 type;
};
#define BOOST_PP_FILENAME_1 \
<boost/fusion/container/vector/detail/vector_n_chooser.hpp>
-#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
+#define BOOST_PP_ITERATION_LIMITS (1, BOOST_PP_DEC(FUSION_MAX_VECTOR_SIZE))
#include BOOST_PP_ITERATE()
- template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
- struct vector_n_chooser
- {
- typedef
- mpl::BOOST_PP_CAT(vector, FUSION_MAX_VECTOR_SIZE)
- <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>
- input;
-
- typedef typename mpl::begin<input>::type begin;
- typedef typename mpl::find<input, void_>::type end;
- typedef typename mpl::distance<begin, end>::type size;
-
- typedef typename get_vector_n<size::value>::template
- call<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>::type
- type;
- };
}}}
#endif
@@ -85,14 +69,12 @@
#define N BOOST_PP_ITERATION()
- template <>
- struct get_vector_n<N>
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+ struct vector_n_chooser<
+ BOOST_PP_ENUM_PARAMS(N, T)
+ BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SUB(FUSION_MAX_VECTOR_SIZE, N), void_ BOOST_PP_INTERCEPT)>
{
- template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
- struct call
- {
- typedef BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, T)> type;
- };
+ typedef BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, T)> type;
};
#undef N
Modified: branches/release/boost/fusion/support/detail/access.hpp
==============================================================================
--- branches/release/boost/fusion/support/detail/access.hpp (original)
+++ branches/release/boost/fusion/support/detail/access.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -7,12 +7,8 @@
#if !defined(FUSION_ACCESS_04182005_0737)
#define FUSION_ACCESS_04182005_0737
-#include <boost/mpl/eval_if.hpp>
-#include <boost/mpl/identity.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/add_reference.hpp>
-#include <boost/type_traits/is_reference.hpp>
-#include <boost/type_traits/remove_cv.hpp>
namespace boost { namespace fusion { namespace detail
{
@@ -33,22 +29,35 @@
};
template <typename T>
- struct non_ref_parameter
+ struct call_param
{
- typedef typename boost::remove_cv<T>::type const& type;
+ typedef T const& type;
};
template <typename T>
- struct call_param
+ struct call_param<T &>
{
- typedef typename
- mpl::eval_if<
- is_reference<T>
- , mpl::identity<T>
- , non_ref_parameter<T>
- >::type
- type;
+ typedef T& type;
};
+
+ template <typename T>
+ struct call_param<T const>
+ {
+ typedef T const& type;
+ };
+
+ template <typename T>
+ struct call_param<T volatile>
+ {
+ typedef T const& type;
+ };
+
+ template <typename T>
+ struct call_param<T const volatile>
+ {
+ typedef T const& type;
+ };
+
}}}
#endif
Modified: branches/release/boost/proto/context/callable.hpp
==============================================================================
--- branches/release/boost/proto/context/callable.hpp (original)
+++ branches/release/boost/proto/context/callable.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -209,8 +209,8 @@
/// <tt>DefaultCtx::eval\<Expr, Context\></tt>.
template<typename Expr, typename ThisContext = Context>
struct eval
- : mpl::if_<
- detail::is_expr_handled<Expr, Context>
+ : mpl::if_c<
+ detail::is_expr_handled<Expr, Context>::value
, callable_eval<Expr, ThisContext>
, typename DefaultCtx::template eval<Expr, Context>
>::type
@@ -258,6 +258,9 @@
)
);
operator fun_type *() const;
+
+ private:
+ callable_context_wrapper &operator =(callable_context_wrapper const &);
};
template<typename Expr, typename Context>
Modified: branches/release/boost/proto/context/default.hpp
==============================================================================
--- branches/release/boost/proto/context/default.hpp (original)
+++ branches/release/boost/proto/context/default.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -154,11 +154,12 @@
typedef typename result_of::child_c<Expr, 1>::type e1;
typedef typename proto::result_of::eval<UNREF(e0), Context>::type r0;
typedef typename proto::result_of::eval<UNREF(e1), Context>::type r1;
+ typedef typename remove_const<typename remove_reference<r1>::type>::type uncvref_r1;
public:
- typedef typename detail::mem_ptr_fun<r0, r1>::result_type result_type;
+ typedef typename detail::mem_ptr_fun<r0, uncvref_r1>::result_type result_type;
result_type operator ()(Expr &expr, Context &ctx) const
{
- return detail::mem_ptr_fun<r0, r1>()(
+ return detail::mem_ptr_fun<r0, uncvref_r1>()(
proto::eval(proto::child_c<0>(expr), ctx)
, proto::eval(proto::child_c<1>(expr), ctx)
);
@@ -174,6 +175,7 @@
typedef typename result_of::child_c<Expr, 1>::type e1;
typedef typename proto::result_of::eval<UNREF(e0), Context>::type r0;
typedef typename proto::result_of::eval<UNREF(e1), Context>::type r1;
+ typedef typename remove_const<typename remove_reference<r1>::type>::type uncvref_r1;
public:
typedef detail::memfun<r0, r1> result_type;
result_type const operator ()(Expr &expr, Context &ctx) const
@@ -353,14 +355,16 @@
result_type invoke(Expr &expr, Context &context, mpl::true_, mpl::false_) const
{
- using namespace detail::get_pointer_;
- return (get_pointer(EVAL(~, 1, expr)) ->* EVAL(~, 0, expr))();
+ BOOST_PROTO_USE_GET_POINTER();
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (BOOST_PROTO_GET_POINTER(class_type, EVAL(~, 1, expr)) ->* EVAL(~, 0, expr))();
}
result_type invoke(Expr &expr, Context &context, mpl::false_, mpl::true_) const
{
- using namespace detail::get_pointer_;
- return (get_pointer(EVAL(~, 1, expr)) ->* EVAL(~, 0, expr));
+ BOOST_PROTO_USE_GET_POINTER();
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (BOOST_PROTO_GET_POINTER(class_type, EVAL(~, 1, expr)) ->* EVAL(~, 0, expr));
}
};
@@ -421,8 +425,9 @@
result_type invoke(Expr &expr, Context &context, mpl::true_) const
{
#define M0(Z, M, expr) BOOST_PP_COMMA_IF(BOOST_PP_SUB(M, 2)) EVAL(Z, M, expr)
- using namespace detail::get_pointer_;
- return (get_pointer(EVAL(~, 1, expr)) ->* EVAL(~, 0, expr))(
+ BOOST_PROTO_USE_GET_POINTER();
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (BOOST_PROTO_GET_POINTER(class_type, EVAL(~, 1, expr)) ->* EVAL(~, 0, expr))(
BOOST_PP_REPEAT_FROM_TO(2, N, M0, expr)
);
#undef M0
Modified: branches/release/boost/proto/deep_copy.hpp
==============================================================================
--- branches/release/boost/proto/deep_copy.hpp (original)
+++ branches/release/boost/proto/deep_copy.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -170,6 +170,7 @@
, BOOST_PP_CAT(list, N)<
BOOST_PP_ENUM(N, BOOST_PROTO_DEFINE_DEEP_COPY_TYPE, ~)
>
+ , N
>
expr_type;
Modified: branches/release/boost/proto/detail/decltype.hpp
==============================================================================
--- branches/release/boost/proto/detail/decltype.hpp (original)
+++ branches/release/boost/proto/detail/decltype.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -18,6 +18,8 @@
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/mpl/if.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
#include <boost/type_traits/is_class.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/type_traits/remove_reference.hpp>
@@ -30,6 +32,7 @@
#include <boost/utility/addressof.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/utility/enable_if.hpp>
+#include <boost/proto/repeat.hpp>
#include <boost/proto/detail/suffix.hpp> // must be last include
// If we're generating doxygen documentation, hide all the nasty
@@ -109,7 +112,7 @@
friend any operator^(any, any);
friend any operator,(any, any);
friend any operator->*(any, any);
-
+
friend any operator<<=(any, any);
friend any operator>>=(any, any);
friend any operator*=(any, any);
@@ -122,9 +125,9 @@
friend any operator^=(any, any);
};
}
-
+
using anyns::any;
-
+
////////////////////////////////////////////////////////////////////////////////////////////
template<typename T>
struct as_mutable
@@ -226,7 +229,7 @@
template<typename T>
char (&check_reference(T const &))[2];
- namespace has_get_pointer_
+ namespace has_get_pointerns
{
using boost::get_pointer;
void *(&get_pointer(...))[2];
@@ -235,77 +238,147 @@
template<typename T>
struct has_get_pointer
{
- static T &t;
- BOOST_STATIC_CONSTANT(bool, value = sizeof(void *) == sizeof(get_pointer(t)));
+ BOOST_STATIC_CONSTANT(bool, value = sizeof(void *) == sizeof(get_pointer(make<T &>())));
typedef mpl::bool_<value> type;
};
}
- using has_get_pointer_::has_get_pointer;
-
+ using has_get_pointerns::has_get_pointer;
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ template<typename T>
+ struct classtypeof;
+
+ template<typename T, typename U>
+ struct classtypeof<T U::*>
+ {
+ typedef U type;
+ };
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ template<typename T>
+ T &lvalue(T &t)
+ {
+ return t;
+ }
+
+ template<typename T>
+ T const &lvalue(T const &t)
+ {
+ return t;
+ }
+
////////////////////////////////////////////////////////////////////////////////////////////
- namespace get_pointer_
+ template<typename U, typename V, typename T>
+ U *proto_get_pointer(T &t, V *, U *)
+ {
+ return boost::addressof(t);
+ }
+
+ template<typename U, typename V, typename T>
+ U const *proto_get_pointer(T &t, V *, U const *)
+ {
+ return boost::addressof(t);
+ }
+
+ template<typename U, typename V, typename T>
+ V *proto_get_pointer(T &t, V *, ...)
+ {
+ return get_pointer(t);
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ #define BOOST_PROTO_USE_GET_POINTER() \
+ using namespace boost::proto::detail::get_pointerns \
+ /**/
+
+ #define BOOST_PROTO_GET_POINTER(Type, Obj) \
+ boost::proto::detail::proto_get_pointer<Type>( \
+ boost::proto::detail::lvalue(Obj) \
+ , (true ? 0 : get_pointer(Obj)) \
+ , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(Obj))) \
+ ) \
+ /**/
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ namespace get_pointerns
{
using boost::get_pointer;
template<typename T>
- typename disable_if<has_get_pointer<T>, T *>::type
+ typename disable_if_c<has_get_pointer<T>::value, T *>::type
get_pointer(T &t)
{
return boost::addressof(t);
}
template<typename T>
- typename disable_if<has_get_pointer<T>, T const *>::type
+ typename disable_if_c<has_get_pointer<T>::value, T const *>::type
get_pointer(T const &t)
{
return boost::addressof(t);
}
-
+
+ char test_ptr_to_const(void *);
+ char (&test_ptr_to_const(void const *))[2];
+
+ template<typename U> char test_V_is_a_U(U *);
+ template<typename U> char test_V_is_a_U(U const *);
+ template<typename U> char (&test_V_is_a_U(...))[2];
+
////////////////////////////////////////////////////////////////////////////////////////////
- template<
- typename T
- , typename U
- , bool IsMemPtr = is_member_object_pointer<
- typename remove_reference<U>::type
- >::value
- >
- struct mem_ptr_fun
+ // result_of_ is a wrapper around boost::result_of that also handles "invocations" of
+ // member object pointers.
+ template<typename T, typename Void = void>
+ struct result_of_
+ : boost::result_of<T>
+ {};
+
+ template<typename T, typename U, typename V>
+ struct result_of_<T U::*(V), typename enable_if_c<is_member_object_pointer<T U::*>::value>::type>
{
- BOOST_PROTO_DECLTYPE_(
- proto::detail::make_mutable<T>() ->* proto::detail::make<U>()
- , result_type
- )
+ BOOST_STATIC_CONSTANT(bool, is_V_a_smart_ptr = 2 == sizeof(test_V_is_a_U<U>(&lvalue(make<V>()))));
+ BOOST_STATIC_CONSTANT(bool, is_ptr_to_const = 2 == sizeof(test_ptr_to_const(BOOST_PROTO_GET_POINTER(U, make<V>()))));
- result_type operator()(
- typename add_reference<typename add_const<T>::type>::type t
- , typename add_reference<typename add_const<U>::type>::type u
- ) const
- {
- return t ->* u;
- }
+ // If V is not a U, then it is a (smart) pointer and we can always return an lvalue.
+ // Otherwise, we can only return an lvalue if we are given one.
+ typedef
+ typename mpl::eval_if_c<
+ (is_V_a_smart_ptr || is_reference<V>::value)
+ , mpl::eval_if_c<
+ is_ptr_to_const
+ , add_reference<typename add_const<T>::type>
+ , add_reference<T>
+ >
+ , mpl::identity<T>
+ >::type
+ type;
};
////////////////////////////////////////////////////////////////////////////////////////////
template<typename T, typename U>
- struct mem_ptr_fun<T, U, true>
+ struct mem_ptr_fun;
+
+ template<typename T, typename U, typename V>
+ struct mem_ptr_fun<T, U V::*>
{
BOOST_PROTO_DECLTYPE_(
- get_pointer(proto::detail::make_mutable<T>()) ->* proto::detail::make<U>()
+ BOOST_PROTO_GET_POINTER(V, proto::detail::make_mutable<T>()) ->* proto::detail::make<U V::*>()
, result_type
)
result_type operator()(
typename add_reference<typename add_const<T>::type>::type t
- , typename add_reference<typename add_const<U>::type>::type u
+ , U V::*u
) const
{
- return get_pointer(t) ->* u;
+ return BOOST_PROTO_GET_POINTER(V, t) ->* u;
}
};
}
- using get_pointer_::mem_ptr_fun;
+ using get_pointerns::result_of_;
+ using get_pointerns::mem_ptr_fun;
////////////////////////////////////////////////////////////////////////////////////////////
template<typename A0, typename A1>
@@ -333,51 +406,7 @@
};
////////////////////////////////////////////////////////////////////////////////////////////
- template<typename T>
- struct result_of_member;
-
- template<typename T, typename U>
- struct result_of_member<T U::*>
- {
- typedef T type;
- };
-
- template<typename T, typename Void = void>
- struct result_of_
- : boost::result_of<T>
- {};
-
- template<typename T, typename U>
- struct result_of_<T(U), typename enable_if<is_member_object_pointer<T> >::type>
- {
- typedef
- typename result_of_member<T>::type
- type;
- };
-
- template<typename T, typename U>
- struct result_of_<T(U &), typename enable_if<is_member_object_pointer<T> >::type>
- {
- typedef
- typename add_reference<
- typename result_of_member<T>::type
- >::type
- type;
- };
-
- template<typename T, typename U>
- struct result_of_<T(U const &), typename enable_if<is_member_object_pointer<T> >::type>
- {
- typedef
- typename add_reference<
- typename add_const<
- typename result_of_member<T>::type
- >::type
- >::type
- type;
- };
-
- ////////////////////////////////////////////////////////////////////////////////////////////
+ // normalize a function type for use with boost::result_of
template<typename T, typename U = T>
struct result_of_fixup
: mpl::if_c<is_function<T>::value, T *, U>
@@ -421,36 +450,39 @@
//BOOST_MPL_ASSERT((is_same<void(*)(), result_of_fixup<void(&)()>::type>));
template<typename T, typename PMF>
- struct memfun
+ struct memfun;
+
+ template<typename T, typename U, typename V>
+ struct memfun<T, U V::*>
{
- typedef typename remove_const<typename remove_reference<PMF>::type>::type pmf_type;
- typedef typename boost::result_of<pmf_type(T)>::type result_type;
+ typedef typename boost::result_of<U V::*(T)>::type result_type;
- memfun(T t, PMF p)
+ memfun(T t, U V::*p)
: obj(t)
, pmf(p)
{}
result_type operator()() const
{
- using namespace get_pointer_;
- return (get_pointer(obj) ->* pmf)();
+ BOOST_PROTO_USE_GET_POINTER();
+ return (BOOST_PROTO_GET_POINTER(V, obj) ->* pmf)();
}
- #define M0(Z, N, DATA) \
- template<BOOST_PP_ENUM_PARAMS_Z(Z, N, typename A)> \
- result_type operator()(BOOST_PP_ENUM_BINARY_PARAMS_Z(Z, N, A, const &a)) const \
+ #define BOOST_PROTO_LOCAL_MACRO(N, typename_A, A_const_ref, A_const_ref_a, a) \
+ template<typename_A(N)> \
+ result_type operator()(A_const_ref_a(N)) const \
{ \
- using namespace get_pointer_; \
- return (get_pointer(obj) ->* pmf)(BOOST_PP_ENUM_PARAMS_Z(Z, N, a)); \
+ BOOST_PROTO_USE_GET_POINTER(); \
+ return (BOOST_PROTO_GET_POINTER(V, obj) ->* pmf)(a(N)); \
} \
/**/
- BOOST_PP_REPEAT_FROM_TO(1, BOOST_PROTO_MAX_ARITY, M0, ~)
- #undef M0
+ #define BOOST_PROTO_LOCAL_a BOOST_PROTO_a
+ #define BOOST_PROTO_LOCAL_LIMITS (1, BOOST_PROTO_MAX_ARITY)
+ #include BOOST_PROTO_LOCAL_ITERATE()
private:
T obj;
- PMF pmf;
+ U V::*pmf;
};
} // namespace detail
Modified: branches/release/boost/proto/detail/funop.hpp
==============================================================================
--- branches/release/boost/proto/detail/funop.hpp (original)
+++ branches/release/boost/proto/detail/funop.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -29,6 +29,7 @@
Expr &
BOOST_PP_ENUM_TRAILING(BOOST_PP_ITERATION(), M0, ~)
>
+ , BOOST_PP_INC(BOOST_PP_ITERATION())
> type;
static type const call(
Modified: branches/release/boost/proto/detail/poly_function.hpp
==============================================================================
--- branches/release/boost/proto/detail/poly_function.hpp (original)
+++ branches/release/boost/proto/detail/poly_function.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -173,8 +173,32 @@
#include BOOST_PP_ITERATE()
};
+ typedef char poly_function_t;
+ typedef char (&mono_function_t)[2];
+ typedef char (&unknown_function_t)[3];
+
+ template<typename T> poly_function_t test_poly_function(T *, typename T::is_poly_function_base_ * = 0);
+ template<typename T> mono_function_t test_poly_function(T *, typename T::result_type * = 0);
+ template<typename T> unknown_function_t test_poly_function(T *, ...);
+
////////////////////////////////////////////////////////////////////////////////////////////////
- template<typename PolyFunSig, bool IsPoly>
+ template<typename Fun, typename Sig, std::size_t Switch = sizeof(test_poly_function<Fun>(0,0))>
+ struct poly_function_traits
+ {
+ typedef typename Fun::template result<Sig>::type result_type;
+ typedef Fun function_type;
+ };
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ template<typename Fun, typename Sig>
+ struct poly_function_traits<Fun, Sig, sizeof(mono_function_t)>
+ {
+ typedef typename Fun::result_type result_type;
+ typedef Fun function_type;
+ };
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ template<typename PolyFunSig, bool IsPolyFunction>
struct as_mono_function_impl;
////////////////////////////////////////////////////////////////////////////////////////////////
@@ -237,21 +261,29 @@
#define N BOOST_PP_ITERATION()
////////////////////////////////////////////////////////////////////////////////////////////////
- template<typename PolyFun, BOOST_PP_ENUM_PARAMS(N, typename A)>
+ template<typename PolyFun BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
+ struct poly_function_traits<PolyFun, PolyFun(BOOST_PP_ENUM_PARAMS(N, A)), sizeof(poly_function_t)>
+ {
+ typedef typename PolyFun::template impl<BOOST_PP_ENUM_PARAMS(N, const A)> function_type;
+ typedef typename function_type::result_type result_type;
+ };
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ template<typename PolyFun BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
struct as_mono_function_impl<PolyFun(BOOST_PP_ENUM_PARAMS(N, A)), true>
{
typedef typename PolyFun::template impl<BOOST_PP_ENUM_PARAMS(N, const A)> type;
};
////////////////////////////////////////////////////////////////////////////////////////////////
- template<typename PolyFun, BOOST_PP_ENUM_PARAMS(N, typename A)>
+ template<typename PolyFun BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
struct as_mono_function_impl<PolyFun(BOOST_PP_ENUM_PARAMS(N, A)), false>
{
typedef PolyFun type;
};
////////////////////////////////////////////////////////////////////////////////////////////////
- template<typename PolyFun, BOOST_PP_ENUM_PARAMS(N, typename A)>
+ template<typename PolyFun BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
struct as_mono_function<PolyFun(BOOST_PP_ENUM_PARAMS(N, A))>
: as_mono_function_impl<PolyFun(BOOST_PP_ENUM_PARAMS(N, A)), is_poly_function<PolyFun>::value>
{};
Modified: branches/release/boost/proto/expr.hpp
==============================================================================
--- branches/release/boost/proto/expr.hpp (original)
+++ branches/release/boost/proto/expr.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -43,7 +43,7 @@
/// INTERNAL ONLY
///
#define BOOST_PROTO_CHILD(Z, N, DATA) \
- typedef typename Args::BOOST_PP_CAT(child, N) BOOST_PP_CAT(proto_child, N); \
+ typedef BOOST_PP_CAT(Arg, N) BOOST_PP_CAT(proto_child, N); \
BOOST_PP_CAT(proto_child, N) BOOST_PP_CAT(child, N); \
/**< INTERNAL ONLY */
@@ -72,24 +72,34 @@
typedef Expr *type;
};
- template<typename X, std::size_t N, typename Y>
- void checked_copy(X (&x)[N], Y (&y)[N])
+ template<typename T, typename Tag, typename Arg0>
+ proto::expr<Tag, proto::term<Arg0>, 0> make_terminal(T &t, proto::expr<Tag, proto::term<Arg0>, 0> *)
{
+ proto::expr<Tag, proto::term<Arg0>, 0> that = {t};
+ return that;
+ }
+
+ template<typename T, typename Tag, typename Arg0, std::size_t N>
+ proto::expr<Tag, proto::term<Arg0[N]>, 0> make_terminal(T (&t)[N], proto::expr<Tag, proto::term<Arg0[N]>, 0> *)
+ {
+ expr<Tag, proto::term<Arg0[N]>, 0> that;
for(std::size_t i = 0; i < N; ++i)
{
- y[i] = x[i];
+ that.child0[i] = t[i];
}
+ return that;
}
- template<typename T, std::size_t N>
- struct if_is_array
- {};
-
- template<typename T, std::size_t N>
- struct if_is_array<T[N], N>
+ template<typename T, typename Tag, typename Arg0, std::size_t N>
+ proto::expr<Tag, proto::term<Arg0[N]>, 0> make_terminal(T const(&t)[N], proto::expr<Tag, proto::term<Arg0[N]>, 0> *)
{
- typedef int type;
- };
+ expr<Tag, proto::term<Arg0[N]>, 0> that;
+ for(std::size_t i = 0; i < N; ++i)
+ {
+ that.child0[i] = t[i];
+ }
+ return that;
+ }
}
@@ -111,6 +121,9 @@
// expr<> because uses of proto_base_expr in proto::matches<> shouldn't
// case the expr<> type to be instantiated. (<-- Check that assumtion!)
// OR, should expr<>::proto_base_expr be a typedef for basic_expr<>?
+ // It should, and proto_base() can return *this reinterpret_cast to
+ // a basic_expr because they should be layout compatible. Or not, because
+ // that would incur an extra template instantiation. :-(
BOOST_PROTO_BEGIN_ADL_NAMESPACE(exprns_)
#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PROTO_MAX_ARITY, <boost/proto/expr.hpp>))
@@ -179,14 +192,23 @@
///
/// \c proto::expr\<\> is a valid Fusion random-access sequence, where
/// the elements of the sequence are the child expressions.
- template<typename Tag, typename Args>
- struct expr<Tag, Args, BOOST_PP_ITERATION() >
+ #if IS_TERMINAL
+ template<typename Tag, typename Arg0>
+ struct expr<Tag, term<Arg0>, 0>
+ #else
+ template<typename Tag BOOST_PP_ENUM_TRAILING_PARAMS(ARG_COUNT, typename Arg)>
+ struct expr<Tag, BOOST_PP_CAT(list, BOOST_PP_ITERATION())<BOOST_PP_ENUM_PARAMS(ARG_COUNT, Arg)>, BOOST_PP_ITERATION() >
+ #endif
{
typedef Tag proto_tag;
BOOST_STATIC_CONSTANT(long, proto_arity_c = BOOST_PP_ITERATION());
typedef mpl::long_<BOOST_PP_ITERATION() > proto_arity;
typedef expr proto_base_expr;
- typedef Args proto_args;
+ #if IS_TERMINAL
+ typedef term<Arg0> proto_args;
+ #else
+ typedef BOOST_PP_CAT(list, BOOST_PP_ITERATION())<BOOST_PP_ENUM_PARAMS(ARG_COUNT, Arg)> proto_args;
+ #endif
typedef default_domain proto_domain;
BOOST_PROTO_FUSION_DEFINE_TAG(proto::tag::proto_expr)
typedef expr proto_derived_expr;
@@ -209,43 +231,31 @@
return *this;
}
+ #if IS_TERMINAL
/// \return A new \c expr\<\> object initialized with the specified
/// arguments.
///
- template<BOOST_PP_ENUM_PARAMS(ARG_COUNT, typename A)>
- static expr const make(BOOST_PP_ENUM_BINARY_PARAMS(ARG_COUNT, A, const &a))
- {
- expr that = {BOOST_PP_ENUM_PARAMS(ARG_COUNT, a)};
- return that;
- }
-
- #if IS_TERMINAL
- /// \overload
- ///
template<typename A0>
static expr const make(A0 &a0)
{
- expr that = {a0};
- return that;
+ return detail::make_terminal(a0, static_cast<expr *>(0));
}
/// \overload
///
- template<typename A0, std::size_t N>
- static expr const make(A0 (&a0)[N], typename detail::if_is_array<proto_child0, N>::type = 0)
+ template<typename A0>
+ static expr const make(A0 const &a0)
{
- expr that;
- detail::checked_copy(a0, that.child0);
- return that;
+ return detail::make_terminal(a0, static_cast<expr *>(0));
}
-
- /// \overload
+ #else
+ /// \return A new \c expr\<\> object initialized with the specified
+ /// arguments.
///
- template<typename A0, std::size_t N>
- static expr const make(A0 const (&a0)[N], typename detail::if_is_array<proto_child0, N>::type = 0)
+ template<BOOST_PP_ENUM_PARAMS(ARG_COUNT, typename A)>
+ static expr const make(BOOST_PP_ENUM_BINARY_PARAMS(ARG_COUNT, A, const &a))
{
- expr that;
- detail::checked_copy(a0, that.child0);
+ expr that = {BOOST_PP_ENUM_PARAMS(ARG_COUNT, a)};
return that;
}
#endif
@@ -281,12 +291,14 @@
proto::expr<
proto::tag::assign
, list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
> const
operator =(A &a) const
{
proto::expr<
proto::tag::assign
, list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
> that = {*this, proto::as_child(a)};
return that;
}
@@ -297,12 +309,14 @@
proto::expr<
proto::tag::assign
, list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
> const
operator =(A const &a) const
{
proto::expr<
proto::tag::assign
, list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
> that = {*this, proto::as_child(a)};
return that;
}
@@ -314,12 +328,14 @@
proto::expr<
proto::tag::assign
, list2<expr &, typename result_of::as_child<A>::type>
+ , 2
> const
operator =(A &a)
{
proto::expr<
proto::tag::assign
, list2<expr &, typename result_of::as_child<A>::type>
+ , 2
> that = {*this, proto::as_child(a)};
return that;
}
@@ -330,12 +346,14 @@
proto::expr<
proto::tag::assign
, list2<expr &, typename result_of::as_child<A const>::type>
+ , 2
> const
operator =(A const &a)
{
proto::expr<
proto::tag::assign
, list2<expr &, typename result_of::as_child<A const>::type>
+ , 2
> that = {*this, proto::as_child(a)};
return that;
}
@@ -349,12 +367,14 @@
proto::expr<
proto::tag::subscript
, list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
> const
operator [](A &a) const
{
proto::expr<
proto::tag::subscript
, list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
> that = {*this, proto::as_child(a)};
return that;
}
@@ -364,12 +384,15 @@
template<typename A>
proto::expr<
proto::tag::subscript
- , list2<expr const &, typename result_of::as_child<A const>::type> > const
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
operator [](A const &a) const
{
proto::expr<
proto::tag::subscript
, list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
> that = {*this, proto::as_child(a)};
return that;
}
@@ -381,12 +404,14 @@
proto::expr<
proto::tag::subscript
, list2<expr &, typename result_of::as_child<A>::type>
+ , 2
> const
operator [](A &a)
{
proto::expr<
proto::tag::subscript
, list2<expr &, typename result_of::as_child<A>::type>
+ , 2
> that = {*this, proto::as_child(a)};
return that;
}
@@ -397,12 +422,14 @@
proto::expr<
proto::tag::subscript
, list2<expr &, typename result_of::as_child<A const>::type>
+ , 2
> const
operator [](A const &a)
{
proto::expr<
proto::tag::subscript
, list2<expr &, typename result_of::as_child<A const>::type>
+ , 2
> that = {*this, proto::as_child(a)};
return that;
}
@@ -419,20 +446,20 @@
/// Function call
///
/// \return A new \c expr\<\> node representing the function invocation of \c (*this)().
- proto::expr<proto::tag::function, list1<expr const &> > const
+ proto::expr<proto::tag::function, list1<expr const &>, 1> const
operator ()() const
{
- proto::expr<proto::tag::function, list1<expr const &> > that = {*this};
+ proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
return that;
}
#if IS_TERMINAL
/// \overload
///
- proto::expr<proto::tag::function, list1<expr &> > const
+ proto::expr<proto::tag::function, list1<expr &>, 1> const
operator ()()
{
- proto::expr<proto::tag::function, list1<expr &> > that = {*this};
+ proto::expr<proto::tag::function, list1<expr &>, 1> that = {*this};
return that;
}
#endif
Modified: branches/release/boost/proto/extends.hpp
==============================================================================
--- branches/release/boost/proto/extends.hpp (original)
+++ branches/release/boost/proto/extends.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -200,6 +200,7 @@
proto_derived_expr BOOST_PROTO_CONST ## Const & \
, typename boost::proto::result_of::as_child<A, proto_domain>::type \
> \
+ , 2 \
> \
) \
>::type const \
@@ -211,6 +212,7 @@
proto_derived_expr BOOST_PROTO_CONST ## Const & \
, typename boost::proto::result_of::as_child<A, proto_domain>::type \
> \
+ , 2 \
> that_type; \
that_type that = { \
*static_cast<proto_derived_expr BOOST_PROTO_CONST ## Const *>(this) \
@@ -228,6 +230,7 @@
proto_derived_expr BOOST_PROTO_CONST ## Const & \
, typename boost::proto::result_of::as_child<A const, proto_domain>::type \
> \
+ , 2 \
> \
) \
>::type const \
@@ -239,6 +242,7 @@
proto_derived_expr BOOST_PROTO_CONST ## Const & \
, typename boost::proto::result_of::as_child<A const, proto_domain>::type \
> \
+ , 2 \
> that_type; \
that_type that = { \
*static_cast<proto_derived_expr BOOST_PROTO_CONST ## Const *>(this) \
@@ -271,6 +275,7 @@
proto_derived_expr BOOST_PROTO_CONST ## Const & \
, typename boost::proto::result_of::as_child<A, proto_domain>::type \
> \
+ , 2 \
> \
) \
>::type const \
@@ -282,6 +287,7 @@
proto_derived_expr BOOST_PROTO_CONST ## Const & \
, typename boost::proto::result_of::as_child<A, proto_domain>::type \
> \
+ , 2 \
> that_type; \
that_type that = { \
*static_cast<proto_derived_expr BOOST_PROTO_CONST ## Const *>(this) \
@@ -299,6 +305,7 @@
proto_derived_expr BOOST_PROTO_CONST ## Const & \
, typename boost::proto::result_of::as_child<A const, proto_domain>::type \
> \
+ , 2 \
> \
) \
>::type const \
@@ -310,6 +317,7 @@
proto_derived_expr BOOST_PROTO_CONST ## Const & \
, typename boost::proto::result_of::as_child<A const, proto_domain>::type \
> \
+ , 2 \
> that_type; \
that_type that = { \
*static_cast<proto_derived_expr BOOST_PROTO_CONST ## Const *>(this) \
@@ -534,7 +542,7 @@
struct virtual_member
{
typedef
- expr<tag::member, list2<This &, expr<tag::terminal, term<Fun> > const &> >
+ expr<tag::member, list2<This &, expr<tag::terminal, term<Fun> > const &>, 2>
proto_base_expr;
typedef Domain proto_domain;
typedef virtual_member<This, Fun, Domain> proto_derived_expr;
@@ -564,7 +572,7 @@
proto_child1 child1() const
{
- static expr<tag::terminal, term<Fun> > const that = {Fun()};
+ static expr<tag::terminal, term<Fun>, 0> const that = {Fun()};
return that;
}
};
Modified: branches/release/boost/proto/fusion.hpp
==============================================================================
--- branches/release/boost/proto/fusion.hpp (original)
+++ branches/release/boost/proto/fusion.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -103,8 +103,8 @@
template<typename This, typename Expr>
struct result<This(Expr)>
- : mpl::if_<
- is_same<Tag, UNREF(Expr)::proto_tag>
+ : mpl::if_c<
+ is_same<Tag, UNREF(Expr)::proto_tag>::value
, flat_view<UNREF(Expr) const>
, fusion::single_view<UNREF(Expr) const &>
>
Modified: branches/release/boost/proto/generate.hpp
==============================================================================
--- branches/release/boost/proto/generate.hpp (original)
+++ branches/release/boost/proto/generate.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -56,6 +56,7 @@
proto::expr<
typename expr_params<Expr>::tag
, term<typename detail::term_traits<typename expr_params<Expr>::args::child0>::value_type>
+ , 0
>
type;
@@ -343,6 +344,16 @@
}}
+ // Specialization of boost::result_of to eliminate some unnecessary template instantiations
+ namespace boost
+ {
+ template<typename Expr>
+ struct result_of<proto::default_domain(Expr)>
+ {
+ typedef Expr type;
+ };
+ }
+
#endif // BOOST_PROTO_GENERATE_HPP_EAN_02_13_2007
#else // BOOST_PP_IS_ITERATING
@@ -359,6 +370,7 @@
// typename uncvref<typename expr_params<Expr>::args::child0>::type, ...
BOOST_PP_ENUM(N, BOOST_PROTO_DEFINE_BY_VALUE_TYPE, Expr)
>
+ , N
>
type;
Modified: branches/release/boost/proto/literal.hpp
==============================================================================
--- branches/release/boost/proto/literal.hpp (original)
+++ branches/release/boost/proto/literal.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -36,10 +36,10 @@
, typename Domain BOOST_PROTO_WHEN_BUILDING_DOCS(= default_domain)
>
struct literal
- : extends<expr<tag::terminal, term<T> >, literal<T, Domain>, Domain>
+ : extends<expr<tag::terminal, term<T>, 0>, literal<T, Domain>, Domain>
{
private:
- typedef expr<tag::terminal, term<T> > terminal_type;
+ typedef expr<tag::terminal, term<T>, 0> terminal_type;
typedef extends<terminal_type, literal<T, Domain>, Domain> base_type;
public:
Modified: branches/release/boost/proto/make_expr.hpp
==============================================================================
--- branches/release/boost/proto/make_expr.hpp (original)
+++ branches/release/boost/proto/make_expr.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -174,8 +174,8 @@
unref_type;
typedef
- typename mpl::eval_if<
- boost::is_reference_wrapper<T>
+ typename mpl::eval_if_c<
+ boost::is_reference_wrapper<T>::value
, proto::result_of::as_child<unref_type, Domain>
, proto::result_of::as_expr<unref_type, Domain>
>::type
@@ -183,8 +183,8 @@
static type call(T &t)
{
- return typename mpl::if_<
- is_reference_wrapper<T>
+ return typename mpl::if_c<
+ is_reference_wrapper<T>::value
, functional::as_child<Domain>
, functional::as_expr<Domain>
>::type()(static_cast<unref_type &>(t));
@@ -976,6 +976,7 @@
typedef proto::expr<
Tag
, BOOST_PP_CAT(list, N)<BOOST_PP_ENUM(N, BOOST_PROTO_AS_CHILD_TYPE, (A, ~, Domain)) >
+ , N
> expr_type;
typedef typename Domain::template result<void(expr_type)>::type result_type;
@@ -1009,6 +1010,7 @@
, BOOST_PP_CAT(list, N)<
BOOST_PP_ENUM(N, BOOST_PROTO_FUSION_AS_CHILD_AT_TYPE, ~)
>
+ , N
> expr_type;
typedef typename Domain::template result<void(expr_type)>::type type;
Modified: branches/release/boost/proto/operators.hpp
==============================================================================
--- branches/release/boost/proto/operators.hpp (original)
+++ branches/release/boost/proto/operators.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -46,9 +46,9 @@
template<typename Domain, typename Tag, typename Left, typename Right>
struct generate_if_left
: lazy_enable_if_c<
- matches<proto::expr<Tag, proto::list2<Left &, Right> >, typename Domain::proto_grammar>::value
+ matches<proto::expr<Tag, proto::list2<Left &, Right>, 2>, typename Domain::proto_grammar>::value
, typename Domain::template result<void(
- proto::expr<Tag, proto::list2<Left &, typename Domain::template result<void(Right)>::type> >
+ proto::expr<Tag, proto::list2<Left &, typename Domain::template result<void(Right)>::type>, 2>
)>
>
{};
@@ -57,15 +57,15 @@
template<typename Tag, typename Left, typename Right>
struct generate_if_left<proto::default_domain, Tag, Left, Right>
{
- typedef proto::expr<Tag, proto::list2<Left &, Right> > type;
+ typedef proto::expr<Tag, proto::list2<Left &, Right>, 2> type;
};
template<typename Domain, typename Tag, typename Left, typename Right>
struct generate_if_right
: lazy_enable_if_c<
- matches<proto::expr<Tag, proto::list2<Left, Right &> >, typename Domain::proto_grammar>::value
+ matches<proto::expr<Tag, proto::list2<Left, Right &>, 2>, typename Domain::proto_grammar>::value
, typename Domain::template result<void(
- proto::expr<Tag, proto::list2<typename Domain::template result<void(Left)>::type, Right &> >
+ proto::expr<Tag, proto::list2<typename Domain::template result<void(Left)>::type, Right &>, 2>
)>
>
{};
@@ -74,7 +74,7 @@
template<typename Tag, typename Left, typename Right>
struct generate_if_right<proto::default_domain, Tag, Left, Right>
{
- typedef proto::expr<Tag, proto::list2<Left, Right &> > type;
+ typedef proto::expr<Tag, proto::list2<Left, Right &>, 2> type;
};
template<typename Tag, typename Left, typename Right, typename Enable1 = void, typename Enable2 = void>
@@ -87,11 +87,11 @@
typename Left::proto_domain
, Tag
, Left
- , proto::expr<tag::terminal, term<Right &> >
+ , proto::expr<tag::terminal, term<Right &>, 0>
>
{
- typedef proto::expr<tag::terminal, term<Right &> > term_type;
- typedef proto::expr<Tag, list2<Left &, typename Left::proto_domain::template result<void(term_type)>::type> > expr_type;
+ typedef proto::expr<tag::terminal, term<Right &>, 0> term_type;
+ typedef proto::expr<Tag, list2<Left &, typename Left::proto_domain::template result<void(term_type)>::type>, 2> expr_type;
static typename Left::proto_domain::template result<void(expr_type)>::type
make(Left &left, Right &right)
@@ -107,12 +107,12 @@
: generate_if_right<
typename Right::proto_domain
, Tag
- , proto::expr<tag::terminal, term<Left &> >
+ , proto::expr<tag::terminal, term<Left &>, 0>
, Right
>
{
- typedef proto::expr<tag::terminal, term<Left &> > term_type;
- typedef proto::expr<Tag, list2<typename Right::proto_domain::template result<void(term_type)>::type, Right &> > expr_type;
+ typedef proto::expr<tag::terminal, term<Left &>, 0> term_type;
+ typedef proto::expr<Tag, list2<typename Right::proto_domain::template result<void(term_type)>::type, Right &>, 2> expr_type;
static typename Right::proto_domain::template result<void(expr_type)>::type
make(Left &left, Right &right)
@@ -132,10 +132,10 @@
struct as_expr_if<Tag, Left, Right, typename Left::proto_is_expr_, typename Right::proto_is_expr_>
: generate_if<
typename Left::proto_domain
- , proto::expr<Tag, list2<Left &, Right &> >
+ , proto::expr<Tag, list2<Left &, Right &>, 2>
>
{
- typedef proto::expr<Tag, list2<Left &, Right &> > expr_type;
+ typedef proto::expr<Tag, list2<Left &, Right &>, 2> expr_type;
BOOST_MPL_ASSERT((is_same<typename Left::proto_domain, typename Right::proto_domain>));
static typename Left::proto_domain::template result<void(expr_type)>::type
@@ -160,46 +160,46 @@
template<typename Domain, typename Trait, typename Arg, typename Expr>
struct enable_unary
- : boost::enable_if<
- boost::mpl::and_<Trait, boost::proto::matches<Expr, typename Domain::proto_grammar> >
+ : boost::enable_if_c<
+ boost::mpl::and_<Trait, boost::proto::matches<Expr, typename Domain::proto_grammar> >::value
, Expr
>
{};
template<typename Trait, typename Arg, typename Expr>
struct enable_unary<deduce_domain, Trait, Arg, Expr>
- : boost::enable_if<
+ : boost::enable_if_c<
boost::mpl::and_<
Trait
, boost::proto::matches<Expr, typename domain_of<Arg>::type::proto_grammar>
- >
+ >::value
, Expr
>
{};
template<typename Trait, typename Arg, typename Expr>
struct enable_unary<default_domain, Trait, Arg, Expr>
- : boost::enable_if<Trait, Expr>
+ : boost::enable_if_c<Trait::value, Expr>
{};
template<typename Domain, typename Trait1, typename Arg1, typename Trait2, typename Arg2, typename Expr>
struct enable_binary
- : boost::enable_if<
+ : boost::enable_if_c<
boost::mpl::and_<
mpl::bool_<(3 <= (arg_weight<Arg1, Trait1>::value + arg_weight<Arg2, Trait2>::value))>
, boost::proto::matches<Expr, typename Domain::proto_grammar>
- >
+ >::value
, Expr
>
{};
template<typename Trait1, typename Arg1, typename Trait2, typename Arg2, typename Expr>
struct enable_binary<deduce_domain, Trait1, Arg1, Trait2, Arg2, Expr>
- : boost::enable_if<
+ : boost::enable_if_c<
boost::mpl::and_<
mpl::bool_<(3 <= (arg_weight<Arg1, Trait1>::value + arg_weight<Arg2, Trait2>::value))>
, boost::proto::matches<Expr, typename deduce_domain2<Arg1, Arg2>::type::proto_grammar>
- >
+ >::value
, Expr
>
{};
@@ -221,22 +221,22 @@
template<typename Arg> \
typename detail::generate_if< \
typename Arg::proto_domain \
- , proto::expr<TAG, list1<typename Arg::proto_derived_expr &> > \
+ , proto::expr<TAG, list1<typename Arg::proto_derived_expr &>, 1> \
>::type const \
operator OP(Arg &arg BOOST_PROTO_UNARY_OP_IS_POSTFIX_ ## POST) \
{ \
- typedef proto::expr<TAG, list1<typename Arg::proto_derived_expr &> > that_type; \
+ typedef proto::expr<TAG, list1<typename Arg::proto_derived_expr &>, 1> that_type; \
that_type that = {arg}; \
return typename Arg::proto_domain()(that); \
} \
template<typename Arg> \
typename detail::generate_if< \
typename Arg::proto_domain \
- , proto::expr<TAG, list1<typename Arg::proto_derived_expr const &> > \
+ , proto::expr<TAG, list1<typename Arg::proto_derived_expr const &>, 1> \
>::type const \
operator OP(Arg const &arg BOOST_PROTO_UNARY_OP_IS_POSTFIX_ ## POST) \
{ \
- typedef proto::expr<TAG, list1<typename Arg::proto_derived_expr const &> > that_type; \
+ typedef proto::expr<TAG, list1<typename Arg::proto_derived_expr const &>, 1> that_type; \
that_type that = {arg}; \
return typename Arg::proto_domain()(that); \
} \
Modified: branches/release/boost/proto/proto_fwd.hpp
==============================================================================
--- branches/release/boost/proto/proto_fwd.hpp (original)
+++ branches/release/boost/proto/proto_fwd.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -52,15 +52,30 @@
# endif
#endif
+#ifndef BOOST_PROTO_BROKEN_CONST_QUALIFIED_FUNCTIONS
+# if BOOST_WORKAROUND(__GNUC__, == 3)
+# define BOOST_PROTO_BROKEN_CONST_QUALIFIED_FUNCTIONS
+# endif
+#endif
+
#ifdef BOOST_PROTO_BROKEN_CONST_OVERLOADS
# include <boost/utility/enable_if.hpp>
# include <boost/type_traits/is_const.hpp>
# define BOOST_PROTO_DISABLE_IF_IS_CONST(T)\
- , typename boost::disable_if<boost::is_const<T>, boost::proto::detail::undefined>::type * = 0
+ , typename boost::disable_if_c<boost::is_const<T>::value, boost::proto::detail::undefined>::type * = 0
#else
# define BOOST_PROTO_DISABLE_IF_IS_CONST(T)
#endif
+#ifdef BOOST_PROTO_BROKEN_CONST_QUALIFIED_FUNCTIONS
+# include <boost/utility/enable_if.hpp>
+# include <boost/type_traits/is_function.hpp>
+# define BOOST_PROTO_DISABLE_IF_IS_FUNCTION(T)\
+ , typename boost::disable_if_c<boost::is_function<T>::value, boost::proto::detail::undefined>::type * = 0
+#else
+# define BOOST_PROTO_DISABLE_IF_IS_FUNCTION(T)
+#endif
+
#ifndef BOOST_PROTO_BROKEN_PTS
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
# define BOOST_PROTO_BROKEN_PTS
@@ -682,7 +697,6 @@
#define BOOST_PROTO_UNEXPR() typedef int proto_is_expr_;
#define BOOST_PROTO_CALLABLE() typedef void proto_is_callable_;
- #define BOOST_PROTO_TRANSFORM() typedef void proto_is_transform_;
#define BOOST_PROTO_AGGREGATE() typedef void proto_is_aggregate_;
struct callable
@@ -690,11 +704,7 @@
BOOST_PROTO_CALLABLE()
};
- struct empty_base;
-
- struct transform_base;
-
- template<typename PrimitiveTransform, typename Base = transform_base>
+ template<typename PrimitiveTransform>
struct transform;
template<typename Grammar, typename Fun = Grammar>
Modified: branches/release/boost/proto/traits.hpp
==============================================================================
--- branches/release/boost/proto/traits.hpp (original)
+++ branches/release/boost/proto/traits.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -257,7 +257,7 @@
, remove_cv<T>
>::type
arg0_;
- typedef proto::expr<proto::tag::terminal, term<arg0_> > expr_;
+ typedef proto::expr<proto::tag::terminal, term<arg0_>, 0> expr_;
typedef typename Domain::template result<void(expr_)>::type type;
typedef type const reference;
@@ -345,7 +345,7 @@
>
struct as_child
{
- typedef proto::expr<proto::tag::terminal, term<T &> > expr_;
+ typedef proto::expr<proto::tag::terminal, term<T &>, 0> expr_;
typedef typename Domain::template result<void(expr_)>::type type;
/// INTERNAL ONLY
@@ -529,9 +529,9 @@
/// a grammar element for matching terminal expressions, and a
/// PrimitiveTransform that returns the current expression unchanged.
template<typename T>
- struct terminal : transform<terminal<T>, empty_base>
+ struct terminal
{
- typedef proto::expr<proto::tag::terminal, term<T> > type;
+ typedef proto::expr<proto::tag::terminal, term<T>, 0> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
@@ -569,14 +569,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U, typename V>
- struct if_else_ : transform<if_else_<T, U, V>, empty_base>
+ struct if_else_
{
- typedef proto::expr<proto::tag::if_else_, list3<T, U, V> > type;
+ typedef proto::expr<proto::tag::if_else_, list3<T, U, V>, 3> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<if_else_>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<if_else_, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -597,9 +597,9 @@
/// Use <tt>nullary_expr\<_, _\></tt> as a grammar element to match any
/// nullary expression.
template<typename Tag, typename T>
- struct nullary_expr : transform<nullary_expr<Tag, T>, empty_base>
+ struct nullary_expr
{
- typedef proto::expr<Tag, term<T> > type;
+ typedef proto::expr<Tag, term<T>, 0> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
@@ -641,14 +641,14 @@
/// Use <tt>unary_expr\<_, _\></tt> as a grammar element to match any
/// unary expression.
template<typename Tag, typename T>
- struct unary_expr : transform<unary_expr<Tag, T>, empty_base>
+ struct unary_expr
{
- typedef proto::expr<Tag, list1<T> > type;
+ typedef proto::expr<Tag, list1<T>, 1> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<unary_expr>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<unary_expr, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -666,14 +666,14 @@
/// Use <tt>binary_expr\<_, _, _\></tt> as a grammar element to match any
/// binary expression.
template<typename Tag, typename T, typename U>
- struct binary_expr : transform<binary_expr<Tag, T, U>, empty_base>
+ struct binary_expr
{
- typedef proto::expr<Tag, list2<T, U> > type;
+ typedef proto::expr<Tag, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<binary_expr>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<binary_expr, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -689,14 +689,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T>
- struct unary_plus : transform<unary_plus<T>, empty_base>
+ struct unary_plus
{
- typedef proto::expr<proto::tag::unary_plus, list1<T> > type;
+ typedef proto::expr<proto::tag::unary_plus, list1<T>, 1> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<unary_plus>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<unary_plus, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -710,14 +710,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T>
- struct negate : transform<negate<T>, empty_base>
+ struct negate
{
- typedef proto::expr<proto::tag::negate, list1<T> > type;
+ typedef proto::expr<proto::tag::negate, list1<T>, 1> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<negate>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<negate, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -731,14 +731,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T>
- struct dereference : transform<dereference<T>, empty_base>
+ struct dereference
{
- typedef proto::expr<proto::tag::dereference, list1<T> > type;
+ typedef proto::expr<proto::tag::dereference, list1<T>, 1> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<dereference>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<dereference, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -752,14 +752,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T>
- struct complement : transform<complement<T>, empty_base>
+ struct complement
{
- typedef proto::expr<proto::tag::complement, list1<T> > type;
+ typedef proto::expr<proto::tag::complement, list1<T>, 1> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<complement>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<complement, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -773,14 +773,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T>
- struct address_of : transform<address_of<T>, empty_base>
+ struct address_of
{
- typedef proto::expr<proto::tag::address_of, list1<T> > type;
+ typedef proto::expr<proto::tag::address_of, list1<T>, 1> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<address_of>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<address_of, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -794,14 +794,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T>
- struct logical_not : transform<logical_not<T>, empty_base>
+ struct logical_not
{
- typedef proto::expr<proto::tag::logical_not, list1<T> > type;
+ typedef proto::expr<proto::tag::logical_not, list1<T>, 1> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<logical_not>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<logical_not, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -815,14 +815,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T>
- struct pre_inc : transform<pre_inc<T>, empty_base>
+ struct pre_inc
{
- typedef proto::expr<proto::tag::pre_inc, list1<T> > type;
+ typedef proto::expr<proto::tag::pre_inc, list1<T>, 1> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<pre_inc>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<pre_inc, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -836,14 +836,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T>
- struct pre_dec : transform<pre_dec<T>, empty_base>
+ struct pre_dec
{
- typedef proto::expr<proto::tag::pre_dec, list1<T> > type;
+ typedef proto::expr<proto::tag::pre_dec, list1<T>, 1> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<pre_dec>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<pre_dec, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -857,14 +857,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T>
- struct post_inc : transform<post_inc<T>, empty_base>
+ struct post_inc
{
- typedef proto::expr<proto::tag::post_inc, list1<T> > type;
+ typedef proto::expr<proto::tag::post_inc, list1<T>, 1> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<post_inc>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<post_inc, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -878,14 +878,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T>
- struct post_dec : transform<post_dec<T>, empty_base>
+ struct post_dec
{
- typedef proto::expr<proto::tag::post_dec, list1<T> > type;
+ typedef proto::expr<proto::tag::post_dec, list1<T>, 1> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<post_dec>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<post_dec, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -899,14 +899,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct shift_left : transform<shift_left<T, U>, empty_base>
+ struct shift_left
{
- typedef proto::expr<proto::tag::shift_left, list2<T, U> > type;
+ typedef proto::expr<proto::tag::shift_left, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<shift_left>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<shift_left, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -922,14 +922,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct shift_right : transform<shift_right<T, U>, empty_base>
+ struct shift_right
{
- typedef proto::expr<proto::tag::shift_right, list2<T, U> > type;
+ typedef proto::expr<proto::tag::shift_right, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<shift_right>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<shift_right, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -945,14 +945,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct multiplies : transform<multiplies<T, U>, empty_base>
+ struct multiplies
{
- typedef proto::expr<proto::tag::multiplies, list2<T, U> > type;
+ typedef proto::expr<proto::tag::multiplies, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<multiplies>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<multiplies, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -968,14 +968,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct divides : transform<divides<T, U>, empty_base>
+ struct divides
{
- typedef proto::expr<proto::tag::divides, list2<T, U> > type;
+ typedef proto::expr<proto::tag::divides, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<divides>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<divides, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -991,14 +991,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct modulus : transform<modulus<T, U>, empty_base>
+ struct modulus
{
- typedef proto::expr<proto::tag::modulus, list2<T, U> > type;
+ typedef proto::expr<proto::tag::modulus, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<modulus>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<modulus, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1014,14 +1014,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct plus : transform<plus<T, U>, empty_base>
+ struct plus
{
- typedef proto::expr<proto::tag::plus, list2<T, U> > type;
+ typedef proto::expr<proto::tag::plus, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<plus>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<plus, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1037,14 +1037,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct minus : transform<minus<T, U>, empty_base>
+ struct minus
{
- typedef proto::expr<proto::tag::minus, list2<T, U> > type;
+ typedef proto::expr<proto::tag::minus, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<minus>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<minus, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1060,14 +1060,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct less : transform<less<T, U>, empty_base>
+ struct less
{
- typedef proto::expr<proto::tag::less, list2<T, U> > type;
+ typedef proto::expr<proto::tag::less, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<less>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<less, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1083,14 +1083,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct greater : transform<greater<T, U>, empty_base>
+ struct greater
{
- typedef proto::expr<proto::tag::greater, list2<T, U> > type;
+ typedef proto::expr<proto::tag::greater, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<greater>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<greater, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1106,14 +1106,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct less_equal : transform<less_equal<T, U>, empty_base>
+ struct less_equal
{
- typedef proto::expr<proto::tag::less_equal, list2<T, U> > type;
+ typedef proto::expr<proto::tag::less_equal, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<less_equal>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<less_equal, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1129,14 +1129,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct greater_equal : transform<greater_equal<T, U>, empty_base>
+ struct greater_equal
{
- typedef proto::expr<proto::tag::greater_equal, list2<T, U> > type;
+ typedef proto::expr<proto::tag::greater_equal, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<greater_equal>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<greater_equal, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1152,14 +1152,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct equal_to : transform<equal_to<T, U>, empty_base>
+ struct equal_to
{
- typedef proto::expr<proto::tag::equal_to, list2<T, U> > type;
+ typedef proto::expr<proto::tag::equal_to, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<equal_to>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<equal_to, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1175,14 +1175,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct not_equal_to : transform<not_equal_to<T, U>, empty_base>
+ struct not_equal_to
{
- typedef proto::expr<proto::tag::not_equal_to, list2<T, U> > type;
+ typedef proto::expr<proto::tag::not_equal_to, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<not_equal_to>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<not_equal_to, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1198,14 +1198,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct logical_or : transform<logical_or<T, U>, empty_base>
+ struct logical_or
{
- typedef proto::expr<proto::tag::logical_or, list2<T, U> > type;
+ typedef proto::expr<proto::tag::logical_or, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<logical_or>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<logical_or, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1221,14 +1221,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct logical_and : transform<logical_and<T, U>, empty_base>
+ struct logical_and
{
- typedef proto::expr<proto::tag::logical_and, list2<T, U> > type;
+ typedef proto::expr<proto::tag::logical_and, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<logical_and>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<logical_and, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1244,14 +1244,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct bitwise_and : transform<bitwise_and<T, U>, empty_base>
+ struct bitwise_and
{
- typedef proto::expr<proto::tag::bitwise_and, list2<T, U> > type;
+ typedef proto::expr<proto::tag::bitwise_and, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<bitwise_and>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<bitwise_and, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1267,14 +1267,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct bitwise_or : transform<bitwise_or<T, U>, empty_base>
+ struct bitwise_or
{
- typedef proto::expr<proto::tag::bitwise_or, list2<T, U> > type;
+ typedef proto::expr<proto::tag::bitwise_or, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<bitwise_or>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<bitwise_or, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1290,14 +1290,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct bitwise_xor : transform<bitwise_xor<T, U>, empty_base>
+ struct bitwise_xor
{
- typedef proto::expr<proto::tag::bitwise_xor, list2<T, U> > type;
+ typedef proto::expr<proto::tag::bitwise_xor, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<bitwise_xor>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<bitwise_xor, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1313,14 +1313,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct comma : transform<comma<T, U>, empty_base>
+ struct comma
{
- typedef proto::expr<proto::tag::comma, list2<T, U> > type;
+ typedef proto::expr<proto::tag::comma, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<comma>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<comma, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1332,14 +1332,14 @@
};
template<typename T, typename U>
- struct mem_ptr : transform<mem_ptr<T, U>, empty_base>
+ struct mem_ptr
{
- typedef proto::expr<proto::tag::mem_ptr, list2<T, U> > type;
+ typedef proto::expr<proto::tag::mem_ptr, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<mem_ptr>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<mem_ptr, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1355,14 +1355,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct assign : transform<assign<T, U>, empty_base>
+ struct assign
{
- typedef proto::expr<proto::tag::assign, list2<T, U> > type;
+ typedef proto::expr<proto::tag::assign, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<assign>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<assign, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1378,14 +1378,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct shift_left_assign : transform<shift_left_assign<T, U>, empty_base>
+ struct shift_left_assign
{
- typedef proto::expr<proto::tag::shift_left_assign, list2<T, U> > type;
+ typedef proto::expr<proto::tag::shift_left_assign, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<shift_left_assign>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<shift_left_assign, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1401,14 +1401,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct shift_right_assign : transform<shift_right_assign<T, U>, empty_base>
+ struct shift_right_assign
{
- typedef proto::expr<proto::tag::shift_right_assign, list2<T, U> > type;
+ typedef proto::expr<proto::tag::shift_right_assign, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<shift_right_assign>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<shift_right_assign, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1424,14 +1424,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct multiplies_assign : transform<multiplies_assign<T, U>, empty_base>
+ struct multiplies_assign
{
- typedef proto::expr<proto::tag::multiplies_assign, list2<T, U> > type;
+ typedef proto::expr<proto::tag::multiplies_assign, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<multiplies_assign>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<multiplies_assign, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1447,14 +1447,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct divides_assign : transform<divides_assign<T, U>, empty_base>
+ struct divides_assign
{
- typedef proto::expr<proto::tag::divides_assign, list2<T, U> > type;
+ typedef proto::expr<proto::tag::divides_assign, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<divides_assign>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<divides_assign, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1470,14 +1470,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct modulus_assign : transform<modulus_assign<T, U>, empty_base>
+ struct modulus_assign
{
- typedef proto::expr<proto::tag::modulus_assign, list2<T, U> > type;
+ typedef proto::expr<proto::tag::modulus_assign, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<modulus_assign>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<modulus_assign, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1493,14 +1493,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct plus_assign : transform<plus_assign<T, U>, empty_base>
+ struct plus_assign
{
- typedef proto::expr<proto::tag::plus_assign, list2<T, U> > type;
+ typedef proto::expr<proto::tag::plus_assign, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<plus_assign>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<plus_assign, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1516,14 +1516,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct minus_assign : transform<minus_assign<T, U>, empty_base>
+ struct minus_assign
{
- typedef proto::expr<proto::tag::minus_assign, list2<T, U> > type;
+ typedef proto::expr<proto::tag::minus_assign, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<minus_assign>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<minus_assign, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1539,14 +1539,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct bitwise_and_assign : transform<bitwise_and_assign<T, U>, empty_base>
+ struct bitwise_and_assign
{
- typedef proto::expr<proto::tag::bitwise_and_assign, list2<T, U> > type;
+ typedef proto::expr<proto::tag::bitwise_and_assign, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<bitwise_and_assign>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<bitwise_and_assign, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1562,14 +1562,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct bitwise_or_assign : transform<bitwise_or_assign<T, U>, empty_base>
+ struct bitwise_or_assign
{
- typedef proto::expr<proto::tag::bitwise_or_assign, list2<T, U> > type;
+ typedef proto::expr<proto::tag::bitwise_or_assign, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<bitwise_or_assign>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<bitwise_or_assign, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1585,14 +1585,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct bitwise_xor_assign : transform<bitwise_xor_assign<T, U>, empty_base>
+ struct bitwise_xor_assign
{
- typedef proto::expr<proto::tag::bitwise_xor_assign, list2<T, U> > type;
+ typedef proto::expr<proto::tag::bitwise_xor_assign, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<bitwise_xor_assign>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<bitwise_xor_assign, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1608,14 +1608,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct subscript : transform<subscript<T, U>, empty_base>
+ struct subscript
{
- typedef proto::expr<proto::tag::subscript, list2<T, U> > type;
+ typedef proto::expr<proto::tag::subscript, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<subscript>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<subscript, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1631,14 +1631,14 @@
/// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
/// transform.
template<typename T, typename U>
- struct member : transform<member<T, U>, empty_base>
+ struct member
{
- typedef expr<tag::member, list2<T, U> > type;
+ typedef expr<tag::member, list2<T, U>, 2> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<member>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<member, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -1975,7 +1975,7 @@
/// \param t The object to wrap.
template<typename T>
typename result_of::as_expr<T>::reference
- as_expr(T &t BOOST_PROTO_DISABLE_IF_IS_CONST(T))
+ as_expr(T &t BOOST_PROTO_DISABLE_IF_IS_CONST(T) BOOST_PROTO_DISABLE_IF_IS_FUNCTION(T))
{
return result_of::as_expr<T>::call(t);
}
@@ -1993,7 +1993,7 @@
///
template<typename Domain, typename T>
typename result_of::as_expr<T, Domain>::reference
- as_expr(T &t BOOST_PROTO_DISABLE_IF_IS_CONST(T))
+ as_expr(T &t BOOST_PROTO_DISABLE_IF_IS_CONST(T) BOOST_PROTO_DISABLE_IF_IS_FUNCTION(T))
{
return result_of::as_expr<T, Domain>::call(t);
}
@@ -2028,7 +2028,7 @@
/// \param t The object to wrap.
template<typename T>
typename result_of::as_child<T>::type
- as_child(T &t BOOST_PROTO_DISABLE_IF_IS_CONST(T))
+ as_child(T &t BOOST_PROTO_DISABLE_IF_IS_CONST(T) BOOST_PROTO_DISABLE_IF_IS_FUNCTION(T))
{
return result_of::as_child<T>::call(t);
}
@@ -2046,7 +2046,7 @@
///
template<typename Domain, typename T>
typename result_of::as_child<T, Domain>::type
- as_child(T &t BOOST_PROTO_DISABLE_IF_IS_CONST(T))
+ as_child(T &t BOOST_PROTO_DISABLE_IF_IS_CONST(T) BOOST_PROTO_DISABLE_IF_IS_FUNCTION(T))
{
return result_of::as_child<T, Domain>::call(t);
}
@@ -2268,20 +2268,13 @@
BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SUB(BOOST_PROTO_MAX_ARITY, N), void BOOST_PP_INTERCEPT)
>
#endif
- : transform<
- function<
- BOOST_PP_ENUM_PARAMS(N, A)
- BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SUB(BOOST_PROTO_MAX_ARITY, N), void BOOST_PP_INTERCEPT)
- >
- , empty_base
- >
{
- typedef proto::expr<proto::tag::function, BOOST_PP_CAT(list, N)<BOOST_PP_ENUM_PARAMS(N, A)> > type;
+ typedef proto::expr<proto::tag::function, BOOST_PP_CAT(list, N)<BOOST_PP_ENUM_PARAMS(N, A)>, N> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<function>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<function, Expr, State, Data>
{};
/// INTERNAL ONLY
@@ -2312,21 +2305,13 @@
BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SUB(BOOST_PROTO_MAX_ARITY, N), void BOOST_PP_INTERCEPT)
>
#endif
- : transform<
- nary_expr<
- Tag
- BOOST_PP_ENUM_TRAILING_PARAMS(N, A)
- BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SUB(BOOST_PROTO_MAX_ARITY, N), void BOOST_PP_INTERCEPT)
- >
- , empty_base
- >
{
- typedef proto::expr<Tag, BOOST_PP_CAT(list, N)<BOOST_PP_ENUM_PARAMS(N, A)> > type;
+ typedef proto::expr<Tag, BOOST_PP_CAT(list, N)<BOOST_PP_ENUM_PARAMS(N, A)>, N> type;
typedef type proto_base_expr;
template<typename Expr, typename State, typename Data>
struct impl
- : pass_through<nary_expr>::template impl<Expr, State, Data>
+ : detail::pass_through_impl<nary_expr, Expr, State, Data>
{};
/// INTERNAL ONLY
Modified: branches/release/boost/proto/transform/call.hpp
==============================================================================
--- branches/release/boost/proto/transform/call.hpp (original)
+++ branches/release/boost/proto/transform/call.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -143,15 +143,14 @@
: transform_impl<Expr, State, Data>
{
typedef typename when<_, A0>::template impl<Expr, State, Data>::result_type a0;
- typedef typename detail::as_mono_function<Fun(a0)>::type mono_fun;
- typedef typename boost::result_of<mono_fun(a0)>::type result_type;
+ typedef typename detail::poly_function_traits<Fun, Fun(a0)>::result_type result_type;
result_type operator ()(
typename impl2::expr_param e
, typename impl2::state_param s
, typename impl2::data_param d
) const
{
- return mono_fun()(
+ return typename detail::poly_function_traits<Fun, Fun(a0)>::function_type()(
detail::as_lvalue(typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d))
);
}
@@ -214,15 +213,14 @@
{
typedef typename when<_, A0>::template impl<Expr, State, Data>::result_type a0;
typedef typename when<_, A1>::template impl<Expr, State, Data>::result_type a1;
- typedef typename detail::as_mono_function<Fun(a0, a1)>::type mono_fun;
- typedef typename boost::result_of<mono_fun(a0, a1)>::type result_type;
+ typedef typename detail::poly_function_traits<Fun, Fun(a0, a1)>::result_type result_type;
result_type operator ()(
typename impl2::expr_param e
, typename impl2::state_param s
, typename impl2::data_param d
) const
{
- return mono_fun()(
+ return typename detail::poly_function_traits<Fun, Fun(a0, a1)>::function_type()(
detail::as_lvalue(typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d))
, detail::as_lvalue(typename when<_, A1>::template impl<Expr, State, Data>()(e, s, d))
);
@@ -295,15 +293,14 @@
typedef typename when<_, A0>::template impl<Expr, State, Data>::result_type a0;
typedef typename when<_, A1>::template impl<Expr, State, Data>::result_type a1;
typedef typename when<_, A2>::template impl<Expr, State, Data>::result_type a2;
- typedef typename detail::as_mono_function<Fun(a0, a1, a2)>::type mono_fun;
- typedef typename boost::result_of<mono_fun(a0, a1, a2)>::type result_type;
+ typedef typename detail::poly_function_traits<Fun, Fun(a0, a1, a2)>::result_type result_type;
result_type operator ()(
typename impl2::expr_param e
, typename impl2::state_param s
, typename impl2::data_param d
) const
{
- return mono_fun()(
+ return typename detail::poly_function_traits<Fun, Fun(a0, a1, a2)>::function_type()(
detail::as_lvalue(typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d))
, detail::as_lvalue(typename when<_, A1>::template impl<Expr, State, Data>()(e, s, d))
, detail::as_lvalue(typename when<_, A2>::template impl<Expr, State, Data>()(e, s, d))
@@ -388,11 +385,7 @@
#undef M0
typedef
- typename detail::as_mono_function<Fun(BOOST_PP_ENUM_PARAMS(N, a))>::type
- mono_fun;
-
- typedef
- typename boost::result_of<mono_fun(BOOST_PP_ENUM_PARAMS(N, a))>::type
+ typename detail::poly_function_traits<Fun, Fun(BOOST_PP_ENUM_PARAMS(N, a))>::result_type
result_type;
/// Let \c ax be <tt>when\<_, Ax\>()(e, s, d)</tt>
@@ -413,7 +406,9 @@
typename when<_, BOOST_PP_CAT(A, M)> \
::template impl<Expr, State, Data>()(e, s, d)) \
/**/
- return mono_fun()(BOOST_PP_ENUM(N, M0, ~));
+ return typename detail::poly_function_traits<Fun, Fun(BOOST_PP_ENUM_PARAMS(N, a))>::function_type()(
+ BOOST_PP_ENUM(N, M0, ~)
+ );
#undef M0
}
};
Modified: branches/release/boost/proto/transform/default.hpp
==============================================================================
--- branches/release/boost/proto/transform/default.hpp (original)
+++ branches/release/boost/proto/transform/default.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -158,8 +158,9 @@
typedef typename result_of::child_c<Expr, 1>::type e1;
typedef typename Grammar::template impl<e0, State, Data>::result_type r0;
typedef typename Grammar::template impl<e1, State, Data>::result_type r1;
+ typedef typename remove_const<typename remove_reference<r1>::type>::type uncvref_r1;
public:
- typedef typename detail::mem_ptr_fun<r0, r1>::result_type result_type;
+ typedef typename detail::mem_ptr_fun<r0, uncvref_r1>::result_type result_type;
result_type operator ()(
typename memfun_impl::expr_param e
, typename memfun_impl::state_param s
@@ -168,7 +169,7 @@
{
typename Grammar::template impl<e0, State, Data> t0;
typename Grammar::template impl<e1, State, Data> t1;
- return detail::mem_ptr_fun<r0, r1>()(
+ return detail::mem_ptr_fun<r0, uncvref_r1>()(
t0(proto::child_c<0>(e), s, d)
, t1(proto::child_c<1>(e), s, d)
);
@@ -420,8 +421,9 @@
, mpl::false_
) const
{
- using namespace detail::get_pointer_;
- return (get_pointer(EVAL(~, 1, e)) ->* EVAL(~, 0, e))();
+ BOOST_PROTO_USE_GET_POINTER();
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (BOOST_PROTO_GET_POINTER(class_type, EVAL(~, 1, e)) ->* EVAL(~, 0, e))();
}
result_type invoke(
@@ -432,8 +434,9 @@
, mpl::true_
) const
{
- using namespace detail::get_pointer_;
- return (get_pointer(EVAL(~, 1, e)) ->* EVAL(~, 0, e));
+ BOOST_PROTO_USE_GET_POINTER();
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (BOOST_PROTO_GET_POINTER(class_type, EVAL(~, 1, e)) ->* EVAL(~, 0, e));
}
};
@@ -512,8 +515,9 @@
) const
{
#define M0(Z, M, e) BOOST_PP_COMMA_IF(BOOST_PP_SUB(M, 2)) EVAL(Z, M, e)
- using namespace detail::get_pointer_;
- return (get_pointer(EVAL(~, 1, e)) ->* EVAL(~, 0, e))(
+ BOOST_PROTO_USE_GET_POINTER();
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (BOOST_PROTO_GET_POINTER(class_type, EVAL(~, 1, e)) ->* EVAL(~, 0, e))(
BOOST_PP_REPEAT_FROM_TO(2, N, M0, e)
);
#undef M0
Modified: branches/release/boost/proto/transform/impl.hpp
==============================================================================
--- branches/release/boost/proto/transform/impl.hpp (original)
+++ branches/release/boost/proto/transform/impl.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -15,86 +15,89 @@
namespace boost { namespace proto
{
- template<typename PrimitiveTransform, typename Expr, typename State = int, typename Data = int>
- struct apply_transform
- : PrimitiveTransform::template impl<Expr, State, Data>
- {};
+ /// INTERNAL ONLY
+ ///
+ #define BOOST_PROTO_BASIC_TRANSFORM(PrimitiveTransform) \
+ BOOST_PROTO_CALLABLE() \
+ typedef void proto_is_transform_; \
+ typedef PrimitiveTransform transform_type; \
+ /**/
+
+ /// INTERNAL ONLY
+ ///
+ #define BOOST_PROTO_TRANSFORM(PrimitiveTransform) \
+ BOOST_PROTO_BASIC_TRANSFORM(PrimitiveTransform) \
+ \
+ template<typename Sig> \
+ struct result \
+ { \
+ typedef typename boost::proto::detail::apply_transform<Sig>::result_type type; \
+ }; \
+ \
+ template<typename Expr> \
+ typename boost::proto::detail::apply_transform<transform_type(Expr &)>::result_type \
+ operator ()(Expr &e) const \
+ { \
+ int i = 0; \
+ return boost::proto::detail::apply_transform<transform_type(Expr &)>()(e, i, i); \
+ } \
+ \
+ template<typename Expr, typename State> \
+ typename boost::proto::detail::apply_transform<transform_type(Expr &, State &)>::result_type \
+ operator ()(Expr &e, State &s) const \
+ { \
+ int i = 0; \
+ return boost::proto::detail::apply_transform<transform_type(Expr &, State &)>()(e, s, i); \
+ } \
+ \
+ template<typename Expr, typename State> \
+ typename boost::proto::detail::apply_transform<transform_type(Expr &, State const &)>::result_type \
+ operator ()(Expr &e, State const &s) const \
+ { \
+ int i = 0; \
+ return boost::proto::detail::apply_transform<transform_type(Expr &, State const &)>()(e, s, i); \
+ } \
+ \
+ template<typename Expr, typename State, typename Data> \
+ typename boost::proto::detail::apply_transform<transform_type(Expr &, State &, Data &)>::result_type \
+ operator ()(Expr &e, State &s, Data &d) const \
+ { \
+ return boost::proto::detail::apply_transform<transform_type(Expr &, State &, Data &)>()(e, s, d); \
+ } \
+ \
+ template<typename Expr, typename State, typename Data> \
+ typename boost::proto::detail::apply_transform<transform_type(Expr &, State const &, Data &)>::result_type \
+ operator ()(Expr &e, State const &s, Data &d) const \
+ { \
+ return boost::proto::detail::apply_transform<transform_type(Expr &, State const &, Data &)>()(e, s, d); \
+ } \
+ /**/
- struct transform_base
+ namespace detail
{
- BOOST_PROTO_CALLABLE()
- BOOST_PROTO_TRANSFORM()
- };
+ template<typename Sig>
+ struct apply_transform;
- struct empty_base
- {};
+ template<typename PrimitiveTransform, typename Expr>
+ struct apply_transform<PrimitiveTransform(Expr)>
+ : PrimitiveTransform::template impl<Expr, int, int>
+ {};
+
+ template<typename PrimitiveTransform, typename Expr, typename State>
+ struct apply_transform<PrimitiveTransform(Expr, State)>
+ : PrimitiveTransform::template impl<Expr, State, int>
+ {};
+
+ template<typename PrimitiveTransform, typename Expr, typename State, typename Data>
+ struct apply_transform<PrimitiveTransform(Expr, State, Data)>
+ : PrimitiveTransform::template impl<Expr, State, Data>
+ {};
+ }
- template<
- typename PrimitiveTransform
- , typename Base BOOST_PROTO_WHEN_BUILDING_DOCS(= transform_base)
- >
- struct transform : Base
+ template<typename PrimitiveTransform>
+ struct transform
{
- typedef PrimitiveTransform transform_type;
-
- template<typename Sig>
- struct result;
-
- template<typename This, typename Expr>
- struct result<This(Expr)>
- {
- typedef typename PrimitiveTransform::template impl<Expr, int, int>::result_type type;
- };
-
- template<typename This, typename Expr, typename State>
- struct result<This(Expr, State)>
- {
- typedef typename PrimitiveTransform::template impl<Expr, State, int>::result_type type;
- };
-
- template<typename This, typename Expr, typename State, typename Data>
- struct result<This(Expr, State, Data)>
- {
- typedef typename PrimitiveTransform::template impl<Expr, State, Data>::result_type type;
- };
-
- template<typename Expr>
- typename apply_transform<PrimitiveTransform, Expr &>::result_type
- operator ()(Expr &e) const
- {
- int i = 0;
- return apply_transform<PrimitiveTransform, Expr &>()(e, i, i);
- }
-
- template<typename Expr, typename State>
- typename apply_transform<PrimitiveTransform, Expr &, State &>::result_type
- operator ()(Expr &e, State &s) const
- {
- int i = 0;
- return apply_transform<PrimitiveTransform, Expr &, State &>()(e, s, i);
- }
-
- template<typename Expr, typename State>
- typename apply_transform<PrimitiveTransform, Expr &, State const &>::result_type
- operator ()(Expr &e, State const &s) const
- {
- int i = 0;
- return apply_transform<PrimitiveTransform, Expr &, State const &>()(e, s, i);
- }
-
- template<typename Expr, typename State, typename Data>
- typename apply_transform<PrimitiveTransform, Expr &, State &, Data &>::result_type
- operator ()(Expr &e, State &s, Data &d) const
- {
- return apply_transform<PrimitiveTransform, Expr &, State &, Data &>()(e, s, d);
- }
-
- template<typename Expr, typename State, typename Data>
- typename apply_transform<PrimitiveTransform, Expr &, State const &, Data &>::result_type
- operator ()(Expr &e, State const &s, Data &d) const
- {
- return apply_transform<PrimitiveTransform, Expr &, State const &, Data &>()(e, s, d);
- }
+ BOOST_PROTO_TRANSFORM(PrimitiveTransform)
};
template<typename Expr, typename State, typename Data>
Modified: branches/release/boost/proto/transform/make.hpp
==============================================================================
--- branches/release/boost/proto/transform/make.hpp (original)
+++ branches/release/boost/proto/transform/make.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -65,7 +65,9 @@
{};
template<typename R, typename Expr, typename State, typename Data
- , bool IsTransform = is_callable<R>::value
+ // BUGBUG this should be is_transform, but if R is a template instantiation
+ // it will cause the template to be instantiated, whereas is_callable will not.
+ , bool IsTransform = is_callable<R>::value
>
struct make_if_;
@@ -96,9 +98,11 @@
// TODO could optimize this if R is a transform
template<typename R, typename Expr, typename State, typename Data>
struct make_if_<R, Expr, State, Data, true>
- : remove_const<typename remove_reference<
- typename boost::result_of<R(Expr, State, Data)>::type
- >::type>
+ : remove_const<
+ typename remove_reference<
+ typename R::template impl<Expr, State, Data>::result_type
+ >::type
+ >
{};
template<typename Type, bool IsAggregate = is_aggregate<Type>::value>
Modified: branches/release/boost/proto/transform/pass_through.hpp
==============================================================================
--- branches/release/boost/proto/transform/pass_through.hpp (original)
+++ branches/release/boost/proto/transform/pass_through.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -170,6 +170,7 @@
, BOOST_PP_CAT(list, N)<
BOOST_PP_ENUM(N, BOOST_PROTO_DEFINE_TRANSFORM_TYPE, ~)
>
+ , N
> result_type;
result_type operator ()(
Modified: branches/release/boost/xpressive/detail/core/linker.hpp
==============================================================================
--- branches/release/boost/xpressive/detail/core/linker.hpp (original)
+++ branches/release/boost/xpressive/detail/core/linker.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -77,9 +77,9 @@
typedef typename iterator_value<BidiIter>::type char_type;
// if Locale is std::locale, wrap it in a cpp_regex_traits<Char>
- typedef typename mpl::if_
+ typedef typename mpl::if_c
<
- is_same<Locale, std::locale>
+ is_same<Locale, std::locale>::value
, cpp_regex_traits<char_type>
, Locale
>::type type;
Modified: branches/release/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp
==============================================================================
--- branches/release/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp (original)
+++ branches/release/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -38,7 +38,7 @@
template<typename Xpr, typename Greedy, typename Random>
struct simple_repeat_traits
{
- typedef typename mpl::if_<Greedy, greedy_slow_tag, non_greedy_tag>::type tag_type;
+ typedef typename mpl::if_c<Greedy::value, greedy_slow_tag, non_greedy_tag>::type tag_type;
};
template<>
Modified: branches/release/boost/xpressive/detail/core/state.hpp
==============================================================================
--- branches/release/boost/xpressive/detail/core/state.hpp (original)
+++ branches/release/boost/xpressive/detail/core/state.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -289,7 +289,7 @@
this->context_.results_ptr_ = &what;
this->context_.traits_ = impl.traits_.get();
this->mark_count_ = impl.mark_count_ + 1;
- this->sub_matches_ = this->extras_->sub_match_stack_.push_sequence(total_mark_count);
+ this->sub_matches_ = this->extras_->sub_match_stack_.push_sequence(total_mark_count, detail::sub_match_impl_default());
this->sub_matches_ += impl.hidden_mark_count_;
// initialize the match_results struct
@@ -329,7 +329,7 @@
{
memento<BidiIter> mem =
{
- state.extras_->sub_match_stack_.push_sequence(state.mark_count_, no_fill)
+ state.extras_->sub_match_stack_.push_sequence(state.mark_count_)
, state.context_.results_ptr_->nested_results().size()
, state.action_list_.next
, state.action_list_tail_
Modified: branches/release/boost/xpressive/detail/core/sub_match_impl.hpp
==============================================================================
--- branches/release/boost/xpressive/detail/core/sub_match_impl.hpp (original)
+++ branches/release/boost/xpressive/detail/core/sub_match_impl.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -23,6 +23,13 @@
// need is trivial constructor/destructor. (???)
///////////////////////////////////////////////////////////////////////////////
+// sub_match_impl_default
+//
+struct sub_match_impl_default
+{
+};
+
+///////////////////////////////////////////////////////////////////////////////
// sub_match_impl
//
template<typename BidiIter>
@@ -40,6 +47,14 @@
, zero_width_(false)
{
}
+
+ sub_match_impl &operator =(sub_match_impl_default const &)
+ {
+ this->matched = false;
+ this->repeat_count_ = 0;
+ this->zero_width_ = false;
+ return *this;
+ }
};
}}} // namespace boost::xpressive::detail
Modified: branches/release/boost/xpressive/detail/static/grammar.hpp
==============================================================================
--- branches/release/boost/xpressive/detail/static/grammar.hpp (original)
+++ branches/release/boost/xpressive/detail/static/grammar.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -33,8 +33,8 @@
#define BOOST_XPRESSIVE_CHECK_REGEX(Expr, Char)\
BOOST_MPL_ASSERT\
((\
- typename boost::mpl::if_<\
- boost::xpressive::is_valid_regex<Expr, Char>\
+ typename boost::mpl::if_c<\
+ boost::xpressive::is_valid_regex<Expr, Char>::value\
, boost::mpl::true_\
, boost::xpressive::INVALID_REGULAR_EXPRESSION\
>::type\
Modified: branches/release/boost/xpressive/detail/static/transforms/as_action.hpp
==============================================================================
--- branches/release/boost/xpressive/detail/static/transforms/as_action.hpp (original)
+++ branches/release/boost/xpressive/detail/static/transforms/as_action.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -271,8 +271,8 @@
marked_expr_type;
typedef
- typename mpl::if_<
- proto::matches<action_type, CheckAssertion>
+ typename mpl::if_c<
+ proto::matches<action_type, CheckAssertion>::value
, detail::predicate_matcher<action_copy_type>
, detail::action_matcher<action_copy_type>
>::type
Modified: branches/release/boost/xpressive/detail/static/transforms/as_set.hpp
==============================================================================
--- branches/release/boost/xpressive/detail/static/transforms/as_set.hpp (original)
+++ branches/release/boost/xpressive/detail/static/transforms/as_set.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -190,8 +190,8 @@
// if sizeof(char_type)==1, merge everything into a basic_chset
// BUGBUG this is not optimal.
typedef
- typename mpl::if_<
- detail::is_narrow_char<char_type>
+ typename mpl::if_c<
+ detail::is_narrow_char<char_type>::value
, detail::basic_chset<char_type>
, detail::compound_charset<typename data_type::traits_type>
>::type
Modified: branches/release/boost/xpressive/detail/static/transmogrify.hpp
==============================================================================
--- branches/release/boost/xpressive/detail/static/transmogrify.hpp (original)
+++ branches/release/boost/xpressive/detail/static/transmogrify.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -41,9 +41,9 @@
typedef typename Traits::char_type char_type;
typedef typename Traits::string_type string_type;
- typedef typename mpl::if_
+ typedef typename mpl::if_c
<
- is_char_literal<Matcher, char_type>
+ is_char_literal<Matcher, char_type>::value
, literal_matcher<Traits, ICase, mpl::false_>
, string_matcher<Traits, ICase>
>::type type;
Modified: branches/release/boost/xpressive/detail/static/width_of.hpp
==============================================================================
--- branches/release/boost/xpressive/detail/static/width_of.hpp (original)
+++ branches/release/boost/xpressive/detail/static/width_of.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -230,8 +230,8 @@
template<typename Expr, typename Char, uint_t Count>
struct width_of<Expr, Char, generic_quant_tag<Count, Count> >
- : mpl::if_<
- mpl::equal_to<unknown_width, width_of<typename remove_reference<typename Expr::proto_child0>::type::proto_base_expr, Char> >
+ : mpl::if_c<
+ mpl::equal_to<unknown_width, width_of<typename remove_reference<typename Expr::proto_child0>::type::proto_base_expr, Char> >::value
, unknown_width
, mpl::times<
width_of<typename remove_reference<typename Expr::proto_child0>::type::proto_base_expr, Char>
Modified: branches/release/boost/xpressive/detail/utility/sequence_stack.hpp
==============================================================================
--- branches/release/boost/xpressive/detail/utility/sequence_stack.hpp (original)
+++ branches/release/boost/xpressive/detail/utility/sequence_stack.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -173,8 +173,7 @@
this->begin_ = this->curr_ = this->end_ = 0;
}
- template<bool Fill>
- T *push_sequence(std::size_t count, mpl::bool_<Fill>)
+ T *push_sequence(std::size_t count)
{
// This is the ptr to return
T *ptr = this->curr_;
@@ -192,17 +191,15 @@
return this->grow_(count);
}
- if(Fill)
- {
- std::fill_n(ptr, count, T());
- }
-
return ptr;
}
- T *push_sequence(std::size_t count)
+ template<typename U>
+ T *push_sequence(std::size_t count, U const &u)
{
- return this->push_sequence(count, mpl::true_());
+ T *ptr = this->push_sequence(count);
+ std::fill_n(ptr, count, u);
+ return ptr;
}
void unwind_to(T *ptr)
@@ -229,9 +226,6 @@
}
};
-typedef mpl::false_ no_fill_t;
-no_fill_t const no_fill = {};
-
}}} // namespace boost::xpressive::detail
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
Modified: branches/release/boost/xpressive/match_results.hpp
==============================================================================
--- branches/release/boost/xpressive/match_results.hpp (original)
+++ branches/release/boost/xpressive/match_results.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -410,7 +410,7 @@
{
extras_type &extras = this->get_extras_();
std::size_t size = that.sub_matches_.size();
- detail::sub_match_impl<BidiIter> *sub_matches = extras.sub_match_stack_.push_sequence(size);
+ detail::sub_match_impl<BidiIter> *sub_matches = extras.sub_match_stack_.push_sequence(size, detail::sub_match_impl_default());
detail::core_access<BidiIter>::init_sub_match_vector(this->sub_matches_, sub_matches, size, that.sub_matches_);
// BUGBUG this doesn't share the extras::sequence_stack
Modified: branches/release/boost/xpressive/regex_actions.hpp
==============================================================================
--- branches/release/boost/xpressive/regex_actions.hpp (original)
+++ branches/release/boost/xpressive/regex_actions.hpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -271,8 +271,8 @@
{
typedef UNREF(Sequence) sequence_type;
typedef
- typename mpl::if_<
- is_const<sequence_type>
+ typename mpl::if_c<
+ is_const<sequence_type>::value
, typename sequence_type::const_reference
, typename sequence_type::reference
>::type
@@ -296,8 +296,8 @@
{
typedef UNREF(Sequence) sequence_type;
typedef
- typename mpl::if_<
- is_const<sequence_type>
+ typename mpl::if_c<
+ is_const<sequence_type>::value
, typename sequence_type::const_reference
, typename sequence_type::reference
>::type
@@ -321,8 +321,8 @@
{
typedef UNREF(Sequence) sequence_type;
typedef
- typename mpl::if_<
- is_const<sequence_type>
+ typename mpl::if_c<
+ is_const<sequence_type>::value
, typename sequence_type::value_type const &
, typename sequence_type::value_type &
>::type
Modified: branches/release/libs/proto/doc/reference.xml
==============================================================================
--- branches/release/libs/proto/doc/reference.xml (original)
+++ branches/release/libs/proto/doc/reference.xml 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -1040,6 +1040,7 @@
<xi:include href="reference/context/null.xml"/>
<!-- concepts -->
+ <xi:include href="reference/concepts/BasicPrimitiveTransform.xml"/>
<xi:include href="reference/concepts/CallableTransform.xml"/>
<xi:include href="reference/concepts/ObjectTransform.xml"/>
<xi:include href="reference/concepts/PrimitiveTransform.xml"/>
Modified: branches/release/libs/proto/doc/reference/concepts/PrimitiveTransform.xml
==============================================================================
--- branches/release/libs/proto/doc/reference/concepts/PrimitiveTransform.xml (original)
+++ branches/release/libs/proto/doc/reference/concepts/PrimitiveTransform.xml 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -18,18 +18,14 @@
<description>
<para>
- A PrimitiveTransform is class type that
- has a nested class template called impl that takes
- three template parameters representing an expression
- type, a state type and a data type. Specializations
- of the nested impl template are ternary monomorphic
- function objects that accept expression, state, and
- data parameters. The PrimitiveTransform is itself a
- PolymorphicFunctionObject that is implemented in
- terms of the nested impl template.
+ A PrimitiveTransform is a <conceptname>BasicPrimitiveTransform</conceptname>
+ that is also a <conceptname>PolymorphicFunctionObject</conceptname>
+ implemented in terms of the nested <computeroutput>impl<></computeroutput> template.
</para>
</description>
+ <refines const="no" concept="BasicPrimitiveTransform"/>
+
<notation variables="fn">
<sample-value>
<type name="Fn" />
Modified: branches/release/libs/proto/doc/reference/traits.xml
==============================================================================
--- branches/release/libs/proto/doc/reference/traits.xml (original)
+++ branches/release/libs/proto/doc/reference/traits.xml 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -547,10 +547,9 @@
<template>
<template-type-parameter name="T"/>
</template>
- <inherit><classname>proto::transform</classname>< terminal<T> ></inherit>
<purpose>A metafunction for generating terminal expression types, a grammar element for matching
terminal expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that returns the current expression unchanged. </purpose>
+ a <conceptname>BasicPrimitiveTransform</conceptname> that returns the current expression unchanged. </purpose>
<struct name="impl">
<template>
<template-type-parameter name="Expr"/>
@@ -606,10 +605,9 @@
<template-type-parameter name="U"/>
<template-type-parameter name="V"/>
</template>
- <inherit><classname>proto::transform</classname>< if_else_<T, U, V> ></inherit>
<purpose>A metafunction for generating ternary conditional expression types, a grammar element for
matching ternary conditional expressions, and
- a <conceptname>PrimitiveTransform</conceptname>
+ a <conceptname>BasicPrimitiveTransform</conceptname>
that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
@@ -635,10 +633,9 @@
<template>
<template-type-parameter name="T"/>
</template>
- <inherit><classname>proto::transform</classname>< unary_plus<T> ></inherit>
<purpose>A metafunction for generating unary plus expression types,
a grammar element for matching unary plus expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -663,10 +660,9 @@
<template>
<template-type-parameter name="T"/>
</template>
- <inherit><classname>proto::transform</classname>< negate<T> ></inherit>
<purpose>A metafunction for generating unary minus expression types,
a grammar element for matching unary minus expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -691,10 +687,9 @@
<template>
<template-type-parameter name="T"/>
</template>
- <inherit><classname>proto::transform</classname>< dereference<T> ></inherit>
<purpose>A metafunction for generating defereference expression types,
a grammar element for matching dereference expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -719,10 +714,9 @@
<template>
<template-type-parameter name="T"/>
</template>
- <inherit><classname>proto::transform</classname>< complement<T> ></inherit>
<purpose>A metafunction for generating complement expression types,
a grammar element for matching complement expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -747,10 +741,9 @@
<template>
<template-type-parameter name="T"/>
</template>
- <inherit><classname>proto::transform</classname>< address_of<T> ></inherit>
<purpose>A metafunction for generating address_of expression types,
a grammar element for matching address_of expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -775,10 +768,9 @@
<template>
<template-type-parameter name="T"/>
</template>
- <inherit><classname>proto::transform</classname>< logical_not<T> ></inherit>
<purpose>A metafunction for generating logical_not expression types,
a grammar element for matching logical_not expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -803,10 +795,9 @@
<template>
<template-type-parameter name="T"/>
</template>
- <inherit><classname>proto::transform</classname>< pre_inc<T> ></inherit>
<purpose>A metafunction for generating pre-increment expression types,
a grammar element for matching pre-increment expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -831,10 +822,9 @@
<template>
<template-type-parameter name="T"/>
</template>
- <inherit><classname>proto::transform</classname>< pre_dec<T> ></inherit>
<purpose>A metafunction for generating pre-decrement expression types,
a grammar element for matching pre-decrement expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -859,10 +849,9 @@
<template>
<template-type-parameter name="T"/>
</template>
- <inherit><classname>proto::transform</classname>< post_inc<T> ></inherit>
<purpose>A metafunction for generating post-increment expression types,
a grammar element for matching post-increment expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -887,10 +876,9 @@
<template>
<template-type-parameter name="T"/>
</template>
- <inherit><classname>proto::transform</classname>< post_dec<T> ></inherit>
<purpose>A metafunction for generating post-decrement expression types,
a grammar element for matching post-decrement expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -916,10 +904,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< shift_left<T, U> ></inherit>
<purpose>A metafunction for generating left-shift expression types,
a grammar element for matching left-shift expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -945,10 +932,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< shift_right<T, U> ></inherit>
<purpose>A metafunction for generating right-shift expression types,
a grammar element for matching right-shift expressions, and a
- <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -974,10 +960,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< multiplies<T, U> ></inherit>
<purpose>A metafunction for generating multiplies expression types,
a grammar element for matching multiplies expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1003,10 +988,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< divides<T, U> ></inherit>
<purpose>A metafunction for generating divides expression types,
a grammar element for matching divides expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1032,10 +1016,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< modulus<T, U> ></inherit>
<purpose>A metafunction for generating modulus expression types,
a grammar element for matching modulus expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1061,10 +1044,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< plus<T, U> ></inherit>
<purpose>A metafunction for generating binary plus expression types,
a grammar element for matching binary plus expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1090,10 +1072,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< minus<T, U> ></inherit>
<purpose>A metafunction for generating binary minus expression types,
a grammar element for matching binary minus expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1119,10 +1100,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< less<T, U> ></inherit>
<purpose>A metafunction for generating less expression types,
a grammar element for matching less expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1148,10 +1128,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< greater<T, U> ></inherit>
<purpose>A metafunction for generating greater expression types,
a grammar element for matching greater expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1177,10 +1156,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< less_equal<T, U> ></inherit>
<purpose>A metafunction for generating less-or-equal expression types,
a grammar element for matching less-or-equal expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1206,10 +1184,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< greater_equal<T, U> ></inherit>
<purpose>A metafunction for generating greater-or-equal expression types,
a grammar element for matching greater-or-equal expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1235,10 +1212,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< equal_to<T, U> ></inherit>
<purpose>A metafunction for generating equal-to expression types,
a grammar element for matching equal-to expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1264,10 +1240,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< not_equal_to<T, U> ></inherit>
<purpose>A metafunction for generating not-equal-to expression types,
a grammar element for matching not-equal-to expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1293,10 +1268,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< logical_or<T, U> ></inherit>
<purpose>A metafunction for generating logical-or expression types,
a grammar element for matching logical-or expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1322,10 +1296,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< logical_and<T, U> ></inherit>
<purpose>A metafunction for generating logical-and expression types,
a grammar element for matching logical-and expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1351,10 +1324,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< bitwise_and<T, U> ></inherit>
<purpose>A metafunction for generating bitwise-and expression types,
a grammar element for matching bitwise-and expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1380,10 +1352,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< bitwise_or<T, U> ></inherit>
<purpose>A metafunction for generating bitwise-or expression types,
a grammar element for matching bitwise-or expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1409,10 +1380,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< bitwise_xor<T, U> ></inherit>
<purpose>A metafunction for generating bitwise-xor expression types,
a grammar element for matching bitwise-xor expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1438,10 +1408,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< comma<T, U> ></inherit>
<purpose>A metafunction for generating comma expression types,
a grammar element for matching comma expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1467,7 +1436,6 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< mem_ptr<T, U> ></inherit>
<struct name="impl">
<template>
<template-type-parameter name="Expr"/>
@@ -1491,10 +1459,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< assign<T, U> ></inherit>
<purpose>A metafunction for generating assignment expression types,
a grammar element for matching assignment expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1520,10 +1487,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< shift_left_assign<T, U> ></inherit>
<purpose>A metafunction for generating left-shift-assign expression types,
a grammar element for matching left-shift-assign expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1549,10 +1515,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< shift_right_assign<T, U> ></inherit>
<purpose>A metafunction for generating right-shift-assign expression types,
a grammar element for matching right-shift-assign expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1578,10 +1543,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< multiplies_assign<T, U> ></inherit>
<purpose>A metafunction for generating multiplies-assign expression types,
a grammar element for matching multiplies-assign expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1607,10 +1571,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< divides_assign<T, U> ></inherit>
<purpose>A metafunction for generating divides-assign expression types,
a grammar element for matching divides-assign expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1636,10 +1599,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< modulus_assign<T, U> ></inherit>
<purpose>A metafunction for generating modulus-assign expression types,
a grammar element for matching modulus-assign expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1665,10 +1627,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< plus_assign<T, U> ></inherit>
<purpose>A metafunction for generating plus-assign expression types,
a grammar element for matching plus-assign expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1694,10 +1655,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< minus_assign<T, U> ></inherit>
<purpose>A metafunction for generating minus-assign expression types,
a grammar element for matching minus-assign expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1723,10 +1683,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< bitwise_and_assign<T, U> ></inherit>
<purpose>A metafunction for generating bitwise-and-assign expression types,
a grammar element for matching bitwise-and-assign expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1752,10 +1711,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< bitwise_or_assign<T, U> ></inherit>
<purpose>A metafunction for generating bitwise-or-assign expression types,
a grammar element for matching bitwise-or-assign expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1781,10 +1739,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< bitwise_xor_assign<T, U> ></inherit>
<purpose>A metafunction for generating bitwise-xor-assign expression types,
a grammar element for matching bitwise-xor-assign expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1810,10 +1767,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< subscript<T, U> ></inherit>
<purpose>A metafunction for generating subscript expression types,
a grammar element for matching subscript expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that dispatches to the
+ a <conceptname>BasicPrimitiveTransform</conceptname> that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
<struct name="impl">
@@ -1838,10 +1794,9 @@
<template>
<template-type-parameter name="A" pack="1"/>
</template>
- <inherit><classname>proto::transform</classname>< function<A...> ></inherit>
<purpose>A metafunction for generating function-call expression types, a grammar element for
matching function-call expressions, and
- a <conceptname>PrimitiveTransform</conceptname>
+ a <conceptname>BasicPrimitiveTransform</conceptname>
that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
@@ -1868,10 +1823,9 @@
<template-type-parameter name="Tag"/>
<template-type-parameter name="T"/>
</template>
- <inherit><classname>proto::transform</classname>< nullary_expr<Tag, T> ></inherit>
<purpose>A metafunction for generating nullary expression types, a grammar element for matching
nullary expressions, and
- a <conceptname>PrimitiveTransform</conceptname> that returns the current expression unchanged. </purpose>
+ a <conceptname>BasicPrimitiveTransform</conceptname> that returns the current expression unchanged. </purpose>
<description>
<para>
Use <computeroutput>proto::nullary_expr<<classname>proto::_</classname>, <classname>proto::_</classname>></computeroutput>
@@ -1932,10 +1886,9 @@
<template-type-parameter name="Tag"/>
<template-type-parameter name="T"/>
</template>
- <inherit><classname>proto::transform</classname>< unary_expr<Tag, T> ></inherit>
<purpose>A metafunction for generating unary expression types with a specified tag type,
a grammar element for matching unary expressions, and
- a <conceptname>PrimitiveTransform</conceptname>
+ a <conceptname>BasicPrimitiveTransform</conceptname>
that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
@@ -1969,10 +1922,9 @@
<template-type-parameter name="T"/>
<template-type-parameter name="U"/>
</template>
- <inherit><classname>proto::transform</classname>< binary_expr<Tag, T, U> ></inherit>
<purpose>A metafunction for generating binary expression types with a specified tag type,
a grammar element for matching binary expressions, and
- a <conceptname>PrimitiveTransform</conceptname>
+ a <conceptname>BasicPrimitiveTransform</conceptname>
that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
@@ -2004,10 +1956,9 @@
<template-type-parameter name="Tag"/>
<template-type-parameter name="A" pack="1"/>
</template>
- <inherit><classname>proto::transform</classname>< nary_expr<Tag, A...> ></inherit>
<purpose>A metafunction for generating n-ary expression types with a specified tag type,
a grammar element for matching n-ary expressions, and
- a <conceptname>PrimitiveTransform</conceptname>
+ a <conceptname>BasicPrimitiveTransform</conceptname>
that dispatches to the
<computeroutput><classname alt="proto::pass_through">proto::pass_through<></classname></computeroutput>
transform.</purpose>
Modified: branches/release/libs/proto/doc/reference/transform/when.xml
==============================================================================
--- branches/release/libs/proto/doc/reference/transform/when.xml (original)
+++ branches/release/libs/proto/doc/reference/transform/when.xml 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -14,7 +14,7 @@
<struct name="when">
<template>
<template-type-parameter name="Grammar"/>
- <template-type-parameter name="PrimitiveTransform">
+ <template-type-parameter name="BasicPrimitiveTransform">
<default>Grammar</default>
</template-type-parameter>
</template>
Modified: branches/release/libs/proto/test/Jamfile.v2
==============================================================================
--- branches/release/libs/proto/test/Jamfile.v2 (original)
+++ branches/release/libs/proto/test/Jamfile.v2 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -30,6 +30,7 @@
[ run toy_spirit.cpp ]
[ run toy_spirit2.cpp ]
[ run noinvoke.cpp ]
+ [ run mem_ptr.cpp : : : <toolset>msvc:<cxxflags>/wd4355 ]
[ compile bug2407.cpp ]
;
Modified: branches/release/libs/proto/test/toy_spirit.cpp
==============================================================================
--- branches/release/libs/proto/test/toy_spirit.cpp (original)
+++ branches/release/libs/proto/test/toy_spirit.cpp 2009-06-03 00:32:30 EDT (Wed, 03 Jun 2009)
@@ -521,11 +521,10 @@
struct no_case_directive
{
template<typename Expr>
- typename SpiritGrammar::result<void(Expr, mpl::void_, mpl::void_)>::type const
+ typename boost::result_of<SpiritGrammar(Expr const &)>::type const
operator [](Expr const &expr) const
{
- mpl::void_ null;
- return SpiritGrammar()(expr, null, null);
+ return SpiritGrammar()(expr);
}
};
@@ -540,11 +539,10 @@
{}
template<typename Expr>
- typename boost::result_of<SkipperGrammar(Expr const &, Skipper const &, mpl::void_ &)>::type const
+ typename boost::result_of<SkipperGrammar(Expr const &, Skipper const &)>::type const
operator [](Expr const &expr) const
{
- mpl::void_ null;
- return SkipperGrammar()(expr, this->skip_, null);
+ return SkipperGrammar()(expr, this->skip_);
}
private:
Skipper skip_;
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