You can create a proper proto terminal in your domain using:
ExprWrapper<boost::proto::terminal<DifferenceOperator>::type> const opr = {{}};
calculator< proto::terminal< placeholder<0> >::type > const _1;
"The extends< > Expression Wrapper".
http://www.boost.org/doc/libs/1_57_0/doc/html/proto/users_guide.html#boost_proto.users_guide.front_end.customizing_expressions_in_your_domain.extends
I wish there could be a place where lots of people discuss aboutp.s. It's awfully quiet on this list, is it still the place to discuss Proto?
BartOnce that is done, only the deep copy compiles, but you need a proper grammar for evaluation to work, and a << overload for printing and starting evaluation. The fixed code with a small start of the grammar is attached.Hi Masa,The problem is that you were not really building a proto expression, but just calling your DifferenceOperator directly. You can create a proper proto terminal in your domain using:
ExprWrapper<boost::proto::terminal<DifferenceOperator>::type> const opr = {{}};
p.s. It's awfully quiet on this list, is it still the place to discuss Proto?
Cheers,
On Mon, Dec 14, 2015 at 12:48 PM Masakatsu ITO(伊藤) <itoh.masakatsu@jaxa.jp> wrote:
Hello,
I'm trying to make an EDSL for finite volume method,
which translates a formula of the method into
executable code.
Now I've confirmed that such a formula
std::cout << MyEDSL::opr( 0.1, 0.1) + 1.0 << std::endl;
can be compiled and prints out the correct answer.
_______________________________________________ proto mailing list proto@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/proto