Boost logo

Boost Users :

Subject: Re: [Boost-users] proto: analytical-only math functions
From: Eric Niebler (eric_at_[hidden])
Date: 2009-02-28 21:33:16


Hicham Mouline wrote:
>
> Hello,
> I pasted the code I have so far in
> http://codepad.org/gk9KoR31
> a really cool tool indeed.
>

<snip>

>
> My questions (please refer to the code):
>

<snip>

Hi Hicham,

First let me apologize for not answering your questions the first time
you posted them. I thought, "That's a lot of questions. I'll get to it
when I have time." And I just haven't. Some of your questions are easy,
though, so I'll give you some tips and get to the rest as time allows.

proto::_ can only match types, not non-type template parameters, so you
need to change constant_tag to take an MPL Integral Constant.

The first parameter to proto::extends must be an expression type, so on
line 47, you should probably have "typename
proto::terminal<constant_tag<subscript> >::type", or something.

On line 56, make it: proto::terminal< proto::convertible_to<double> > to
match any terminal expression that is convertible to a double. (It says
so much in the users' guide in the section "fuzzy and exact matches of
terminals".)

You really need to reread the section on domains again. The parameter to
proto::generator must be an expression extension class template.

That's all I have for now. Good luck. And be sure to check the docs,
because you could have found many of these answers there.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net