Reputation: 4178
Is there a way to declare at runtime a boost::accumulator_set
with features determined as runtime?
Something like:
accumulator_set *acc;
if (SomeUserInput1)
{
acc = new accumulator_set< double, features< tag::min >>;
}
if (SomeUserInput2)
{
acc = new accumulator_set< double, features< tag::min, tag::max, tag::mean, tag::... >>;
}
Upvotes: 0
Views: 237
Reputation: 6177
There isn't. You would need to write a type-erased accumulator set wrapper. That would perform badly at runtime, which is why it isn't supported our off the box.
Upvotes: 1