title: Compiling code that uses socket function bind() with libcxx fails
body: <p>I am using the new libcxx library and I have a code that calls the socket function <code>bind()</code>. The problem is that when I type <code>using namespace std;</code> the compiler gives me an error for the following code:</p>
  
  <pre><code>int res = bind(sockfd, (struct sockaddr *)&amp;myAddr, sizeof(myAddr));
  </code></pre>
  
  <p>The error using clang (svn build):</p>
  
  <pre><code>error: no viable conversion from '__bind&lt;int &amp;, sockaddr *, unsigned long&gt;' to 'int'
   int res = bind(sockfd, (struct sockaddr *)&amp;myAddr, sizeof(myAddr));
  </code></pre>
  
  <p>I think that the problem is that <code>using namespace std;</code> brings the function <code>std::bind()</code> from the header <code>&lt;functional&gt;</code> to the scope (although the header is not included). As I am using a third party library that uses the entire namespace std I can't easily change the class names to fully qualified names. </p>
  
  <p>I was wondering whether this is a problem in the implementation of the library or whether there are some new rules in C++11 that might potentially break an old code that uses <code>bind()</code>. Any thoughts on this would be appreciated.</p>
  
  <p>Thanks</p>
  
  <p>Roman</p>