$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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){
_(1)
_(2)
// etc
}
}
#undef _
This doesn't solve the limited range of values problem, though.
Dale