Boost logo

Proto :

Subject: Re: [proto] How to customize an expression in an EDSL , so as to make a deep copy of it?
From: Bart Janssens (bart_at_[hidden])
Date: 2015-12-22 06:57:01

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 =

Once 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.

p.s. It's awfully quiet on this list, is it still the place to discuss



On Mon, Dec 14, 2015 at 12:48 PM Masakatsu ITO(伊藤) <itoh.masakatsu_at_[hidden]>

> 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 list run by eric at