C++ Boost bind value type -
i in documentation , source code cannot figure out how return value type of boost bind functor. trying accomplish following:
35 template<typename t,size_t n, class f> 36 boost::array<typename f::value_type, n> make_array(t (&input)[n], f unary) { 37 boost::array<typename f::value_type, n> array; 38 std::transform(input, input + n, array.begin(), unary); 39 return array; 40 } where f can bind functor. above not work because functor not have value_type. matter, there standard interface unary/binary functor far return value.
solution: should result_type. equivalent defined argument_type , first/second_argument_type binary functions
thanks
doh. nevermind, it's result_type rather value_type. should delete question?
Comments
Post a Comment