Boost logo

Boost Users :

From: Dale McCoy (dalestan_at_[hidden])
Date: 2006-05-02 13:35:59

> I've been working on something similar, and the best I've been able to
> come up with is this:
> <snip>
> If you have a limited range of var values, this should work fine. It's
> pretty tedious though,

That looks pretty well suited to (semi-)automated generation, either
with a separate script, or with something like:

#define _(x) case x: template_func<x>(); break;

void func(const int& var){
    switch (var){
    // etc

#undef _

This doesn't solve the limited range of values problem, though.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at