Re: [proto] expanding Proto's library of callables

2010-12-28 Thread Thomas Heller
Eric Niebler wrote: > Proto ships with a very small collection of callables for use in Proto > transforms: wrappers for fusion algorithms like reverse and pop_front > and the like. For 1.46, there will be a few more: make_pair, first, > second, and wrappers for a few more Fusion algorithms. It's w

Re: [proto] expanding Proto's library of callables

2010-12-28 Thread Eric Niebler
On 12/28/2010 5:39 AM, Thomas Heller wrote: > I just saw that you added functional::at. > I was wondering about the rationale of your decision to make it a non > template. > My gut feeling would have been to have proto::functional::at(seq) > and not proto::functional::at(seq, N). Think of the cas

Re: [proto] expanding Proto's library of callables

2010-12-28 Thread Thomas Heller
Eric Niebler wrote: > On 12/28/2010 5:39 AM, Thomas Heller wrote: >> I just saw that you added functional::at. >> I was wondering about the rationale of your decision to make it a non >> template. >> My gut feeling would have been to have proto::functional::at(seq) >> and not proto::functional::at

Re: [proto] expanding Proto's library of callables

2010-12-28 Thread Eric Niebler
On 12/28/2010 11:43 AM, Thomas Heller wrote: > Eric Niebler wrote: > >> On 12/28/2010 5:39 AM, Thomas Heller wrote: >>> I just saw that you added functional::at. >>> I was wondering about the rationale of your decision to make it a non >>> template. >>> My gut feeling would have been to have proto

Re: [proto] expanding Proto's library of callables

2010-12-28 Thread Thomas Heller
Eric Niebler wrote: > On 12/28/2010 11:43 AM, Thomas Heller wrote: >> Eric Niebler wrote: >> >>> On 12/28/2010 5:39 AM, Thomas Heller wrote: I just saw that you added functional::at. I was wondering about the rationale of your decision to make it a non template. My gut feeling

[proto] Adding stuff in proto operator

2010-12-28 Thread Joel Falcou
Here i smy use case. I guess Eric answer will be "do this at evaluation time" but let's I have some array/matrix DSEL going on. I want to test if two expression containing said matrix has compatible size before creating a proto ast node. e.g if a,b are matrices, a + b should assert if size(a) !

Re: [proto] Adding stuff in proto operator

2010-12-28 Thread Eric Niebler
On 12/28/2010 5:05 PM, Joel Falcou wrote: > Here i smy use case. I guess Eric answer will be "do this at > evaluation time" Do this at evaluation time. Just kidding. > but let's I have some array/matrix DSEL going on. I > want to test if two expression containing said matrix has compatible > siz

Re: [proto] Adding stuff in proto operator

2010-12-28 Thread Joel Falcou
On 28/12/10 23:13, Eric Niebler wrote: On 12/28/2010 5:05 PM, Joel Falcou wrote: Here i smy use case. I guess Eric answer will be "do this at evaluation time" Do this at evaluation time. Just kidding. See :p I was *sure* you will say that :p You missed the "Generator" paramete

Re: [proto] Adding stuff in proto operator

2010-12-28 Thread Joel Falcou
Last question. The geenrator awaits a Expr as parameters, what can be the way to specialize this operator() dependign on the tag passed to the generator ? Extract tag_of out of Expr and then dispacth internally ? ___ proto mailing list proto@lists.boos

Re: [proto] Adding stuff in proto operator

2010-12-28 Thread Joel Falcou
Disregard last question. a generator is just a callable, so i can use a grammar as a generator I guess hence using the grammar to dispacth the proper actions on my ast construction. Am I right ? ___ proto mailing list proto@lists.boost.org http://lists.

Re: [proto] Adding stuff in proto operator

2010-12-28 Thread eric
Bingo. --Original Message-- From: Joel Falcou Sender: proto-boun...@lists.boost.org To: Discussions about Boost.Proto and DSEL design ReplyTo: Discussions about Boost.Proto and DSEL design Subject: Re: [proto] Adding stuff in proto operator Sent: Dec 28, 2010 5:35 PM Disregard last quest