Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2008-03-22 10:42:51


On 03/22/08 09:13, Steven Watanabe wrote:
> AMDG
>
> Larry Evans wrote:
>> On 03/22/08 06:12, Dean Michael Berris wrote:
>> [snip]
>>
>>> I think this begs the question then, what is the necessity for an
>>> Arity parameter as part of the definition of an expr<>?
[snip]
>> it's use for specialization. In my reply to that post I suggested
>> maybe a helper template to eliminate the need for this 3ird
>> parameter, but then, AFAICT, this just delays the need for a 3
>> parameter expr...but wait, if some how the 2 parameter expr
>> were public and somehow the 3 parameter were made private,
>> maybe that would be better.
>
> Well, since expr is an aggregate, adding an extra layer of indirection would
> change the interface, so I don't think that would work.

Hi Steven,

Could you post a test case with the before (only 1 expr with 3 args)
and after (i.e. 2 expr templates where proto::expr takes 2 args and
proto::detail::expr takes 3 args, where the 3ird is the arity) and
then maybe some example in proto which specializes on
arity and show how the 2 expr template method wouldn't work?

Of course I could try it and see if I could make it fail, but
I was hoping you had a better idea of how to make it (
i.e. the 2 expr method) fail.

-regards,
Larry


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk