Boost logo

Boost Users :

Subject: Re: [Boost-users] [fusion] runtime unsigned to a template argument compile-time unsigned
From: Larry Evans (cppljevans_at_[hidden])
Date: 2010-02-22 11:02:07


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)
     ;

HTH.

-regards,
Larry





Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net