
On Mon, 26 Jun 2006 13:52:24 +0200, Lars Monecke
Hi,
i'm stucked and google does not lead me to the right pages :-(
The follwing code example does not compile on gcc 4.1.1 an boost 1.33.1 . It works on msvc.net 7.1.
---code starts here #include
#include #include <iostream>
struct Printer { void operator()(int iValue) { std::cout << iValue << "\n"; } };
int main(int /* argc */, char* /* argv[] */) {
typedef boost::signal
tSignal; tSignal stSignal;
Printer stPrinter; stSignal.connect(stPrinter); typedef std::vector<int> tConInts;
tConInts cInts;
cInts.push_back(1); cInts.push_back(2); cInts.push_back(3);
for_each(cInts.begin(), cInts.end(), boost::bind(&tSignal::operator(), boost::ref(stSignal), _1));
return 0; } ---code ends here
Any hints? Doesn't something like for_each(...,...,bind(stSignal,_1));
work? (Maybe with bind<Ret>(), see docs) Regards Jiri Palecek -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/