You want a conversion from the lambda function to boost::function&lt;void(ArgT)&gt; where ArgT is to be deduced. As a general rule, you cannot have type deduction and conversion in the same argument of a function: no conversions take place when deducing a template parameter.

The reasoning behind this is as follows. There are three types involved here: (1) the template parameter, (2) the function parameter type, (3) the passed object type. Two of the types (1 and 2) can be deduced from one another, but both are unknown. If the compiler can assume 2 and 3 are the same type, the problem is solved, but if all the compiler knows is that 3 can be converted to 2 there could be any number of possible solutions, and the compiler is not expected to solve the problem. In practice we know that in this particular case there is only one possible solution, but the standard does not make a distinction between cases.

The rule above applies in all deducible contexts, even if the template parameter can be deduced from another function parameter. The solution here is make the relevant function parameter a non-deducible context, ie a context in which the compiler will never attempt to deduce the template parameter from the function parameter. This can be done as follows:

template &lt;class T&gt; struct identity { typename T type; };

template &lt;class ArgT&gt;
void foo(ArgT arg, typename identity&lt;::boost::function&lt;void(ArgT)&gt;&gt;::type func)
{
  func(arg);
} 


Why can't my C++ compiler deduce template argument for boost function?
I'm attempting to replicate a cell biology method from a 1958 Laboratory Investigation paper. The protocol is for the isolation of an extracellular matrix protein, and a key step is a centrifugation carried out for 2 hours at 2300 rpm. Apparently it was not common practice to list make, model, and rotor size of centrifuges, so I am a little lost as to what settings to use on my own centrifuge to get the same rcf.

Are there any good starting points for estimating the proper settings? e.g. who the major centrifuge suppliers were at the time or what models would be seen as 'standard' for a cell biology lab?
