Boost logo

Boost Users :

From: Ryan Lovelett (ryan.lovelett_at_[hidden])
Date: 2008-06-24 19:45:46


I've been trying to track down what the maximum number of arguments that can
be added to boost::function<> is. I'm starting to believe that the maximum
number is 10 arguments. As it seems that when I input 11 arguments VS
complains with this error:

Error 1 error C2079: 'my_func' uses undefined class
> 'boost::function<Signature>'
> Error 2 error C2440: 'initializing' : cannot convert from 'void
> (__cdecl *)(const char *,affine_transformation_range
> *,int,int,double,int,int,int,int,int,char)' to 'int'
>

My declaration looks like as follows:
function<void (const
char*,affine_transformation_range*,int,int,double,int,int,int,int,int,char)>
my_func(&XClass:build_with_cache_pool);

My member function is given by:
static void build_with_cache_pool(const char * image_name,
affine_transformation_range * range, int
maximum_number_of_points_on_model,int
number_of_generated_images_to_find_stable_points, double
minimum_number_of_views_rate, int patch_size, int yape_radius, int
number_of_octaves, int number_of_ferns, int number_of_tests_per_fern, char
temp);

Any help with this project would be greatly appreciated.

-- 
Thanks,
Ryan Lovelett


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