Boost logo

Boost Users :

Subject: Re: [Boost-users] [proto] problem with templated recursive transform
From: Daniel Oberhoff (daniel_at_[hidden])
Date: 2009-02-06 14:07:31


Hi,

On 2009-02-05 16:47:15 +0100, Eric Niebler <eric_at_[hidden]> said:

> Daniel Oberhoff wrote:
>> Hi,
>>
>> I have gotten my hands pretty dirty with my array expression DSEL, and
>> hove gotten surprisingly far (surprisingly considering the amounts of
>> black template magic involved :) ).
>>
>> Now I am stuck with a templated recursive transform, that I cant seem to
>> get right.
>
> <snip>
>
>> It also works when ExpressionIteratorBuilder
>> is not a template, though that would not make it very useful.
>>
>> Any ideas?
>
> Could you pls. send either a complete example that I could compile here,
> or at least the error message? I'd prefer a complete example.

Sorry, I had hoped there was something obviously broken. Like
templating a transform based on proto::or_/proto::when. I placed a
zip-file here with the files here:

http://danieloberhoff.de/files/for_eric

There are four headers and a test-suite, based on cppunit. The
expression that breaks is on line 59. Makefile is also there. If that
is too messy for you I can try to trim it down to just this problem.
The class that breaks is at the end of CPUDataNDExpressionIterators.hpp.

>
>> Otherwise I am beginning to love proto, and am looking forward to c++0x
>> when the error messages might become readable through concepts :).
>
> Whether and how to conceptify Proto is an open question. So I'm sorry to
> say that it's not at all certain that C++0x will bring better error
> messages for Proto.

I was actually fearing that. But in this case: wouldn't it somehow be
possible to state

"your type is not callable"

or something like that?

Best

Daniel


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