Getting the address of an overloaded static function
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2942426/how-to-specify-a-pointer-to-an-overloaded-function">how to specify a pointer to an overloaded function?</a>  </p>
</blockquote>



<p>I have a library which has a class defined as:</p>

<pre><code>struct ClassA
{
    static ClassA foo(long);
    static ClassA foo(double);
}
</code></pre>

<p>I need to get the addresses of both of those functions. The code I am currently trying gives error C2440: cannot convert from 'overloaded-function' to '...'</p>

<pre><code>ns::ClassA (ns::ClassA::*ClassA_foo1)(long) = &amp;ns::ClassA::foo;
ns::ClassA (ns::ClassA::*ClassA_foo2)(double) = &amp;ns::ClassA::foo;
</code></pre>

<p>I thought it might be the fact that they are static, but placing static either before or after the return type gives the same error.</p>
