
On 10/12/2010 7:10 PM, David Abrahams wrote:
At Tue, 12 Oct 2010 15:40:38 -0500, Andrew Sutton wrote:
I find it interesting, but also a bit sad, that the thread on metaprogramming “plumbing” is very active, while this fundamental question of abstraction and generic programming has gone unaddressed.
... Says the guy who, quite literally, wrote the book on metaprogramming :) Sorry.
The irony is not lost on me. But I fear I've created a monster :(
Is it possible to distill a succinct phrasing of question being posed? I think I'm having trouble reading it through the reply markers. I think I get the basic gist, but I'm not sure my understanding is complete enough to generate an opinion. Maybe it would make a nice article for C++Next.
The question has to do with what kind of abstraction should be used to expose element access in segmented structures. This short and very readable 1998 paper explains the problem space and offers one approach: http://lafstern.org/matt/segmented.pdf
Jumping in the middle here so this may not be relevant.... Here is the beginning of a discussion on spirit-devel about segmented Fusion algorithms that sought to apply Matt Austern's formulation to Fusion's heterogeneous sequences: http://article.gmane.org/gmane.comp.parsers.spirit.devel/2765 This discussion eventually led to Fusion's current (incomplete, unmaintained) support for segmented sequences. (Although in Fusion, the goal is not improved runtime performance, but easier-to-implement segmented sequences and drastically lower compile-time overhead.) We found no fundamental problems in Austern's formulation of generic segmentation, or in our adaptation of it to meet Fusion's needs. -- Eric Niebler BoostPro Computing http://www.boostpro.com