
30 Apr
2009
30 Apr
'09
3:19 p.m.
Hi, Is there any way to set default argument values with Boost::Function? On VS2008 SP1 I tried: boost::function< void( unsigned i = 1 ) > increment; But this didn't work. Code such as increment( 1 ); compiles OK but if you try doing increment(); the following compiler error is triggered: error C2064: term does not evaluate to a function taking 0 arguments class does not define an 'operator()' or a user defined conversion operator to a pointer-to-function or reference-to-function that takes appropriate number of arguments Thanks, Artyom