Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-07-14 14:32:52


Jeremy wrote:

>Beman Dawes writes:
> >
> > The other homework assignment is to study C&E Part II, Implementation
> > Techniques. Particularly Chapter 10, Static Metaprogramming in C++.
> >
> > [five minutes later...] Amazing! They present compile-time IF<>,
>SWITCH<>,
> > WHILE<>, DO<>, and FOR<> templates! I'm going to take the rest the
day
>off
> > to read this!
>
>I'd be interested in seeing some support for static metaprogramming in
>boost. For example, in the iterator_adaptor code that's under
>development (there's a copy in the vault) I use the IF<> (renamed
>ct_if, ct=compile-time). Also, I use IF<> heavily in the GGCL and MTL
>libraries.
>
>Also, the GenVoca style of component composition advocated in C&E is
>similar to some of the techniques we are already use in boost,
>e.g. operators.hpp.

I would be very surprised if boost didn't add at least some static
metaprogramming support. That's part of why the "Generative Programming"
book is so interesting to me; it builds on the kinds of things we are
already doing. It adds new tools without having to throw out the old ones.

So if you want to put together an initial selection static metaprogramming
tools, that would be great! You might want to contact C&E to see if they
would like to participate; both from the book and their personal web pages
it is obvious their interest in C++ is very high.

By the way, I agree the names just have to be changed or there will be
constant fear of macro clashes. ct_ seems cryptic; how about meta_ as in
meta_if ? But I'd get used to ct_if I suppose.

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk