
15 Apr
2012
15 Apr
'12
11:12 p.m.
on Sun Apr 15 2012, Mathias Gaunard <mathias.gaunard-AT-ens-lyon.org> wrote:
On 15/04/12 15:02, paul Fultz wrote:
Well you can expand the parameter pack to create a static array of function pointers.
I see, interesting.
How does it fare in terms of bloat and performance? Are compilers still able to inline with this?
You can probably get somewhere by using constexpr to ensure that function pointers remain compile-time constants. However, note that such a dispatch may still be less efficient than a switch statement or chained if/then/else. -- Dave Abrahams BoostPro Computing http://www.boostpro.com