
22 Feb
2010
22 Feb
'10
4:17 p.m.
On 02/22/10 10:02, Larry Evans wrote:
On 02/21/10 05:27, Hicham Mouline wrote: [snip]
3. Can I generate an array of function pointers to the various at<>() functions and call the right one at runtime?
The 2 attached files show how this can be done.
Obviously, instead of:
typedef void(* method_type )(void) ;
you'd have:
typedef double(* method_type )(void) ;
This could even be done for heterogeneous return types; however, in that case, a tagged variant. The tag for this variant would be the field index. In the attached code, this would be something like the super_numerals.