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 Proto?

Cheers,

Bart

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.