$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: sgregory_at_[hidden]
Date: 2001-11-13 10:21:57
Hello
Unless this is a silly problem or FAQ...
I'm trying to write code portable to SunC++ (5.2) and MSC++ (6.0).
And am having problems with std::mem_fun or boost::mem_fn with a
class member function that returns void.
// pseudo-example code
struct A {
void func(const double);
};
std::for_each(arr.begin(), arr.end(),
std::bind1st(std::mem_fun(&A::func),&arr)); // fails
std:;for_each(arr.begin(), arr.end(),
std::bind1st(boost::mem_fn(&A::func),&arr)); // also
fails
Should using boost::mem_fn fix the 'void return' problem of MS? Am I
missing something else.
Thanks very much
sdg