Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2004-08-25 14:12:07


"Jody Hagins" <jody-boost-011304_at_[hidden]> wrote

> and in the ctor, I want to call the do_something template method for
> each type, so that it expands to something like...
>
> Bar()
> {
> foo.template do_something<Type1>();
> foo.template do_something<Type2>();
> foo.template do_something<Type3>();
> ...
> foo.template do_something<TypeN>();
> }

Use mpl::for_each<vector>(functor),

where vector is any MPL sequence, and functor has a templated function call
operator.

Regards,
Arkadiy


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