Update of /cvsroot/boost/boost/boost/xpressive/proto
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1459/proto
Modified Files:
context.hpp
Log Message:
callable_context works on intel-win-9.1
Index: context.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/proto/context.hpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- context.hpp 16 Apr 2007 08:10:16 -0000 1.22
+++ context.hpp 16 Apr 2007 08:27:57 -0000 1.23
@@ -401,30 +401,6 @@
operator pointer_to_function() const;
};
- /// INTERNAL ONLY
- ///
- struct has_proper_function_overload
- {
- static inner_context &sprivate_;
- static Expr &sexpr_;
- typedef char yes_type;
- typedef char (&no_type)[2];
- template<typename T> static yes_type check(T const &);
- static no_type check(typename inner_context::private_type_
const &);
- BOOST_STATIC_CONSTANT(bool, value =
- (
- sizeof(yes_type) ==
- sizeof(
- check(
- (sprivate_(
- typename Expr::tag_type()
- BOOST_PP_ENUM_TRAILING(N,
BOOST_PROTO_ARG_N, sexpr_)
- ), 0)
- )
- )));
- typedef mpl::bool_<value> type;
- };
-
public:
typedef
typename boost::result_of<
@@ -437,12 +413,27 @@
result_type operator ()(Expr &expr, Context &context) const
{
- return (*this)(expr, context, typename
has_proper_function_overload::type());
+ BOOST_STATIC_CONSTANT(bool, value =
+ (
+ sizeof(yes_type) ==
+ sizeof(
+ callable_eval::check(
+ (static_cast<inner_context
&>(const_cast<context_type &>(context))(
+ typename Expr::tag_type()
+ BOOST_PP_ENUM_TRAILING(N,
BOOST_PROTO_ARG_N, expr)
+ ), 0)
+ )
+ )));
+ return (*this)(expr, context, mpl::bool_<value>());
}
private:
- /// INTERNAL ONLY
- ///
+
+ typedef char yes_type;
+ typedef char (&no_type)[2];
+ template<typename T> static yes_type check(T const &);
+ static no_type check(typename inner_context::private_type_ const
&);
+
result_type operator ()(Expr &expr, Context &context, mpl::true_)
const
{
return context(
@@ -451,8 +442,6 @@
);
}
- /// INTERNAL ONLY
- ///
result_type operator ()(Expr &expr, Context &context, mpl::false_)
const
{
return default_eval<Expr, Context>()(expr, context);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs