What compiler are you using? Doesn't work on VC 2005 or 2008. Overload resolution ambiguity failure on boost::lambda::function_adaptor<Func>::apply