Update of /cvsroot/boost/boost/libs/xpressive/proto/example
In directory
sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9563/libs/xpressive/proto/example
Modified Files:
calc2.cpp calc3.cpp lazy_vector.cpp
Log Message:
kill proto::generate<>
Index: calc2.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/xpressive/proto/example/calc2.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- calc2.cpp 17 Apr 2007 06:29:32 -0000 1.1
+++ calc2.cpp 26 May 2007 00:53:57 -0000 1.2
@@ -18,9 +18,7 @@
// For expressions in the calculator domain, operator()
// will be special; it will evaluate the expression.
-struct calculator_domain
- : proto::domain<>
-{};
+struct calculator_domain;
// Define a calculator context, for evaluating arithmetic expressions
// (This is as before, in calc1.cpp)
@@ -84,18 +82,9 @@
};
// Tell proto how to generate expressions in the calculator_domain
-namespace boost { namespace proto
-{
- template<typename Expr>
- struct generate<calculator_domain, Expr>
- {
- typedef calculator_expression<Expr> type;
- static type make(Expr const &expr)
- {
- return type(expr);
- }
- };
-}}
+struct calculator_domain
+ : proto::domain<proto::generator<calculator_expression> >
+{};
// Define some placeholders (notice they're wrapped in calculator_expression<>)
calculator_expression<proto::terminal< arg< mpl::int_<1> > >::type> const _1;
Index: calc3.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/xpressive/proto/example/calc3.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- calc3.cpp 17 Apr 2007 06:29:32 -0000 1.1
+++ calc3.cpp 26 May 2007 00:53:57 -0000 1.2
@@ -95,9 +95,7 @@
// For expressions in the calculator domain, operator()
// will be special; it will evaluate the expression.
-struct calculator_domain
- : proto::domain<>
-{};
+struct calculator_domain;
// Define a calculator context, for evaluating arithmetic expressions
// (This is as before, in calc1.cpp and calc2.cpp)
@@ -167,18 +165,9 @@
};
// Tell proto how to generate expressions in the calculator_domain
-namespace boost { namespace proto
-{
- template<typename Expr>
- struct generate<calculator_domain, Expr>
- {
- typedef calculator_expression<Expr> type;
- static type make(Expr const &expr)
- {
- return type(expr);
- }
- };
-}}
+struct calculator_domain
+ : proto::domain<proto::generator<calculator_expression> >
+{};
// Define some placeholders (notice they're wrapped in calculator_expression<>)
calculator_expression<proto::terminal< arg< mpl::int_<1> > >::type> const _1;
Index: lazy_vector.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/xpressive/proto/example/lazy_vector.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- lazy_vector.cpp 29 Apr 2007 03:38:49 -0000 1.2
+++ lazy_vector.cpp 26 May 2007 00:53:57 -0000 1.3
@@ -33,9 +33,7 @@
// Expressions in the lazy vector domain must conform
// to the lazy vector grammar
-struct lazy_vector_domain
- : proto::domain< LazyVectorGrammar >
-{};
+struct lazy_vector_domain;
// Here is an evaluation context that indexes into a lazy vector
// expression, and combines the result.
@@ -118,20 +116,9 @@
// Tell proto that in the lazy_vector_domain, all
// expressions should be wrapped in laxy_vector_expr<>
-namespace boost { namespace proto
-{
- template< typename Expr >
- struct generate< lazy_vector_domain, Expr >
- {
- typedef lazy_vector_expr<Expr> type;
-
- static type make(Expr const &expr)
- {
- return type(expr);
- }
- };
-}}
-
+struct lazy_vector_domain
+ : proto::domain<proto::generator<lazy_vector_expr>, LazyVectorGrammar>
+{};
int main()
{
-------------------------------------------------------------------------
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