471,078 Members | 771 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,078 software developers and data experts.

boost::signal doesn't wotk when compiled with /clr?

Could someone explain why the following code works when compiled
without /clr but fails at runtime with a boost::bad_function_call
exception when compiled with /clr?

#include <iostream>
using std::cout;
using std::endl;
#include <boost/signal.hpp>
#include <functional>

struct EventReceiver
void funct(int a)
cout<<"In funct"<<endl;

int main()
boost::signal<void (int)> event;
EventReceiver receiver;
con=event.connect(std::bind1st(std::mem_fun(EventR eceiver::funct),
&receiver)); //(1)
return 0;

(1) : I've tried other solutions for the binding : using boost::bind,
using an hand-written binary function, etc..., but to no avail.


Nov 17 '05 #1
0 905

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by Jeff Flinn | last post: by
1 post views Thread by alex.gman | last post: by
reply views Thread by ufnuceda | last post: by
9 posts views Thread by atomik.fungus | last post: by
3 posts views Thread by Memfis | last post: by
7 posts views Thread by myfavdepo | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.