Zeljko, may be you can be more specific about your task and we can help you or make some suggestions how to implement it or if metaprogramming will suite to solve the problem. With Kind Regards, Ovanes Markarian On Wed, June 6, 2007 16:52, David Abrahams wrote:
on Wed Jun 06 2007, Zeljko Vrba
wrote: The fusion library manual gives a single example and says "this is just the tip of the iceberg". I was wondering whether the slides/materials from the Boost Conference are available?
I'm most interested in the lectures "Boost Metaprogramming Concepts and Frameworks" and "Fusion by example".
I'm in the process of (slowly) reading THE "MPL book" (by Dave and Alexei), but I'm looking for more "down-to-earth" examples, rather than constructing small DSLs or creating optimized versions of swap.
By "down-to-earth" I suppose you mean "like the problem I'm trying to solve?"
Synopses of the above lectures contain:
"We'll also get a taste of high-level metaprogramming abstractions by using several Boost metaprogramming librariesMPL, Preprocessor, and the Fusion tuple library to solve real problems."
"The emphasis for the examples will be on using Boost.Fusion in application code, rather than as infrastructure for library developers."
I'm in the process of writing a recursive data structure with very similar operations at every level, but still with small behavioral variations. It seems like a perfect problem for metaprogramming,
Why?
but I fail to map MPL's type manipulation routines to my down-to-earth problem.
Maybe because that's not the most appropriate approach for your problem. Did you go through the book's criteria for when metaprogramming might apply, in section 1.1.6?
I have been working on something that sounds similar to what you're doing, but I'm using basic generic programming to do it. Have you seen http://lafstern.org/matt/segmented.pdf ?
I was hoping to get some more insight in MPL from the materials for the abovementioned lectures. Get a new perspective and background to keep in mind while reading the MPL book.
So, I kindly ask Dave Abrahams, Dan Marsden and Joel de Guzman to make their lecture materials available on-line, if possible.
Most of what is in the slides is also in the book, so I don't think it would be of much help to you. If you're not specifically trying to raise the abstraction level of your client's code to the point where they can be seen to be using a DSEL, you probably don't want metaprogramming except as an occasional implementation tool (as shown in the book's swap example, which is really just there to illustrate the value of type information and get you acquainted with type traits).
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users