C++ member function overloading with & (ampersand)
<p>How to pick the correct <strong>error()</strong> member function? Do I need to cast somehow?</p>

<pre><code>using namespace std;

struct test
{
   int error();
   void error(int x);
   int fun();
};

int main() {
   auto f1 = &amp;test::error; // how to pick the correct function?
   auto f2 = &amp;test::fun; // works
}
</code></pre>