|
Boost Users : |
Subject: Re: [Boost-users] [Proto] Reducing domain check in operator
From: Eric Niebler (eric_at_[hidden])
Date: 2009-02-26 14:58:23
Joel Falcou wrote:
> Eric Niebler a écrit :
>> Cool.
>
> Small variation. If I want the domain of A(B) always be X, I just
> specify it with make_expr ?
Yes, or else make A a Proto terminal in the X domain.
>>> Concerning the other approach, I guess it boils down to have terminal
>>> of the given function object laying around?
>>>
>>> terminal< exponent_ > exponent ={{}};
>> ----------------------^ ::type here
>>
>> Right, although it would change the resulting tree, because
>> exponent(x) would have tag type proto::tag::function instead of
>> nt2::tag::exponent_. You'd have to make corresponding changes to your
>> grammar.
>
> To be abel to be called and produce reuslts, exponent_ just need to be a
> Polymorphic Function Object I assume ?
Yes.
>> Hard to say. The only advice I can give is to try it and see.
>
> Seems I found my occupation for this week-end then.
> My main concern is that having lots of declared but unused const object
> may force the compiler to compile all fo them aka ending in
> a verrrrrrry long compile-time and prolly large executable too.
You might be right. I'll be interested in your results.
-- 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