title: Calling nonmember instead of member function
body: <p>I have a very simple problem: Somewhere there is a function</p>
  
  <pre><code>int size (const C &amp; c)
  </code></pre>
  
  <p>which is found, at least, by argument-dependent name lookup. Now the problem:</p>
  
  <pre><code>struct B
  {
      int size () { /* ... */ }
  
      void doSomething (const C &amp; c)
      {
         int x = size (c); // &lt;----------- problem!
         // ...
      }
  }
  </code></pre>
  
  <p>This does not work, as name lookup stops after having found the member function.</p>
  
  <p>What do I have to write in the indicated line such that <em>not</em> the member function is tried to be called, but that, rather, the compiler does whatever it would do if the member function did not exist?</p>
  
  <p>Note that the solution is <em>not</em> writing <code>::size</code>, as this prevents <a href="http://en.wikipedia.org/wiki/Argument-dependent_name_lookup" rel="noreferrer">argument-dependent name lookup</a> and only works if I know where <code>size</code> is declared.</p>
  
  <p><strong>Further complication:</strong></p>
  
  <p>I know that for each relevant type <code>T</code> for which I use the below templated member function <code>B::doSomething</code>, somewhere there will be a function</p>
  
  <pre><code>int size (const T &amp; t)
  </code></pre>
  
  <p>which is found, at least, by argument-dependent name lookup. <code>B</code> looks as follows:</p>
  
  <pre><code>struct B
  {
      int size () { /* ... */ }
  
      template&lt;class T&gt;
      void doSomething (const T &amp; t)
      {
         int x = size (t); // &lt;----------- problem!
         // ...
      }
  }
  </code></pre>
  
  <p>I want the non-member function to be called (which I am sure it exists, but which I cannot be sure about where it lives).</p>