Hello,
I am trying to use a class member function in conjunction with boost's
function input iterator, and am having trouble coming up with a solution
which can in any way be considered elegant...
My initial thought process was to do something like :
std::copy(
// does not work because the functor (1st arg to make_function_input
iterator ) cannot be temporary... or something like that
boost::make_function_input_iterator(boost::bind(&My_Class::my_function,
0)),
boost::make_function_input_iterator(boost::bind(&My_Class::my_function,
10)),
std::ostream_iterator
f = boost::bind(&foo::return_random, bar);
std::copy( boost::make_function_input_iterator(f, 1), boost::make_function_input_iterator(f, 10), std::ostream_iterator<double>(std::cout, "\n") ); return 0; }