Hi, I was programming a stupid server using boost::thread and boost::bind... <br>and sadly I encountered a problem... probably due to my inexpertice with the library.<br><br>The thing is that i&#39;m creting a boost thread object like this :
<br><br>struct bla{<br>&nbsp;&nbsp;&nbsp;&nbsp; void member(){}<br>}<br><br><br>bla b;<br><br>boost::thread t( boost::bind( &amp;bla::member , &amp;b) );<br><br>this works fine but, i need to bind a member pointer that returns an int, so as i understand i need to do this :
<br><br>boost::bind&lt;int&gt;( &amp;bla::member_that_returns_int , &amp;b)<br><br>but boost::thread won&#39;t accept it in the constructor...<br><br>So... what I&#39;m asking is.... is there a trick to do this that I&#39;m not aware of?... basically what occucrred to me was
<br>to encapsulate de method that returns an int using the () operator... but it seems pretty nasty to me.<br><br>is there a way to do it staright forward with boost::bind?<br><br>thanks!<br><br>Nico<br><br><br>