|
Re: segmented fusion - a-ha!: msg#00058parsers.spirit.devel
Eric Niebler wrote:
Yeah! This is "make it as simple as possible" thing that I was looking for. Essentially, segmented sequences are sequences with child sequences (segments). I see: traits::is_segmented<Seq>::type // --> mpl::true_/false_ Then for segmented sequences: segments(seq) // --> a sequence of sequences result_of::segments<Seq>::type // --> a sequence of sequences type Now, a joint_view can hold and return a vector2<Sequence1, Sequence2>& when its intrinsic "segments" is called (via tag-dispatch). Now, if for_each was an object (ala Fusion1), then segmented for_each will simply be: for_each(segments(seq), for_each); (Strike 1 for object algorithms, Dave?) Effectively, each segment is unrolled for us by the mechanism that already exists in fusion! I think this is cool! This is more elegant than I expected it to be. I like it! No, I love it! Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | segmented fusion - a-ha!: 00058, Eric Niebler |
|---|---|
| Next by Date: | Re: Fusion-ifying proto parse trees: 00058, Joel de Guzman |
| Previous by Thread: | segmented fusion - a-ha!i: 00058, Eric Niebler |
| Next by Thread: | Re: segmented fusion - a-ha!: 00058, David Abrahams |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |