title: "Could not deduce template argument" error when using Winsock bind() call with Boost
body: <p>I'm fairly new to C++, and I'm likely in over my head, but that's the way it goes.</p>
  
  <p>I'm working with a fairly large Win32 C++ project that uses Winsock for its network communications.  I'm in the process of trying to convert a bunch of its thread management over to boost, but once I added the references to the boost libraries and what-not, I'm getting about 30 errors on this particular line of code:</p>
  
  <pre><code>bind(mLocalSocketFd, (struct sockaddr *) &amp;localServerAddress, sizeof(localServerAddress));
  </code></pre>
  
  <p>The errors include things like:</p>
  
  <pre><code>error C2602: 'std::tr1::_Result_of2&lt;_Fty,_Farg0,_Farg1&gt;::_Type' is not a member of a base class of 'std::tr1::_Result_of2&lt;_Fty,_Farg0,_Farg1&gt;'
  error C2868: 'std::tr1::_Result_of2&lt;_Fty,_Farg0,_Farg1&gt;::_Type' : illegal syntax for using-declaration; expected qualified-name
  error C2784: 'bool std::operator &lt;(const std::vector&lt;_Ty,_Ax&gt; &amp;,const std::vector&lt;_Ty,_Ax&gt; &amp;)' : could not deduce template argument for 'const std::vector&lt;_Ty,_Ax&gt; &amp;' from 'std::tr1::_Bind_fty&lt;_Fty,_Ret,_BindN&gt;' 
  error C2784: 'bool std::operator &lt;(const std::vector&lt;_Ty,_Ax&gt; &amp;,const std::vector&lt;_Ty,_Ax&gt; &amp;)' : could not deduce template argument for 'const std::vector&lt;_Ty,_Ax&gt; &amp;' from 'std::tr1::_Bind_fty&lt;_Fty,_Ret,_BindN&gt;'
  </code></pre>
  
  <p>I presume that somehow I've managed to tell this particular file ("NetServer.cpp") to use the boost version of bind(), but for the life of me, I can't figure out where that's happening.  The only portion of boost that I'm using is the boost/thread.hpp, and I'm not doing any namespace using's anywhere in NetServer.cpp or in the header files that it links to.</p>
  
  <p>Any suggestions as to what I'm doing wrong, or how to troubleshoot it?  It's obviously some stupid newbie thing, but I can't figure it out.</p>