| 17 | |
| 18 | template<typename FuncType> |
| 19 | typename std::enable_if< |
| 20 | std::is_class<FuncType>::value && |
| 21 | std::is_same<typename boost::function_types::result_type<decltype(&FuncType::operator())>::type, Value>::value && |
| 22 | boost::function_types::function_arity<decltype(&FuncType::operator())>::value == 2, |
| 23 | std::function<Value (const std::vector<Value>&)>>::type |
| 24 | WrapFunction(FuncType function) |
| 25 | { |
| 26 | static_assert(std::is_same<typename boost::mpl::at_c<typename boost::function_types::parameter_types<decltype(&FuncType::operator())>, 1>::type, const std::vector<Value>&>::value, "Argument type must be const std::vector<Value>"); |
| 27 | return function; |
| 28 | } |
| 29 | |
| 30 | inline std::function<Value (const std::vector<Value>&)> WrapFunction(void (*function)(const std::vector<Value>&)) |
| 31 | { |
no test coverage detected