Hi Mojmir,
Hello,
i want to use bind to create a pair and forward it to an std::ostream, i.e. like:
std::for_each(vec.begin(), vec.end(),
bind(&write,
std::cout,
bind(constructor<std::pair<value_t, value_t> >(), _1, _1)));
but the compiler says:
ios_base.h:781: error: 'ios_base(const ios_base &)' is private
boost/boost/lambda/detail/bind_functions.hpp:472: error: within this context
boost/boost/lambda/detail/function_adaptors.hpp: In static member function
`static void boost::lambda::function_adaptor<
void (*)(ostream &, const pair<value_t, value_t> &)
>::apply(
void (*)(ostream &, const pair<value_t, value_t> &),
const ostream &,
const pair<value_t, value_t> &)'
...
it seem that temporary is created? why? how to avoid it?