|
Proto : |
Subject: Re: [proto] My own lambda for MSM / wish list
From: Christophe Henry (christophe.j.henry_at_[hidden])
Date: 2011-03-16 16:30:24
>Well, because it wasn't possible at the time, I assume ;)
>Times have changed since then ...
Indeed. Looks like it. :)
>> What I wanted to know:
>> - can I pass a phoenix expression to a decltype / BOOST_TYPEOF and
>> default-construct it?
>In general, no, because of various terminals that need to be initialized.
>You can however limit the phoenix grammar to only those expressions that can be default constructed.
If you mean all except, say, ints or chars, it's something I can live
with because I already do ;-)
>Why not copy construct them?
I don't see how it would help. I mean, the transition table I'm
generating with the grammar ist and mpl::vector< Row<...>, Row<...> >.
Then run my metaprograms and I have nothing left to construct from.
>Yes, the entry point is pretty high, but i hope its worth it ... If you come to the conclusion that writing your own library is faster and easier phoenix maybe isn't quite >ready for prime time with that respect.
No, it's not what I mean. The library is already written, since about
1 year, it's inside MSM's eUML front-end (see for example
http://www.boost.org/doc/libs/1_46_0/libs/msm/doc/HTML/ch03s04.html#d0e2059).
But the implementation will not win a beauty contest ;-)
So I'm rewriting it and the examples I presented in this thread are
only a cleaned-up, smaller version to show what I'm looking for, with
some stuff I added after I realized it was not usable only with MSM.
Now that I tried to explain what I was looking for and after your
answers and some time I just spent investigating phoenix, I think it's
worth giving a try with phoenix.
So if you accept helping me a bit to come to speed with phoenix
internals, I think MSM can pretty fast be your first "client" ;-)
If you don't mind, I offer to close this thread and start hacking
code. I already have the first questions ready.
>I am looking forward to improvments in the docs, or additions to code you might have!
Sure, we'll see on the way what I'm missing.
Thanks,
Christophe
Proto list run by eric at boostpro.com