Templates non-type parameters to a static member function
<p>I'm trying to write a template that takes a template to a non-type parameter to a static member function:</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;

class C {
public:
    static void method()
    {
        cout &lt;&lt; "C::method" &lt;&lt; endl;
    }
};

typedef void (C::*pMethod)();
template&lt;typename T, pMethod&gt;
void callingFunction()

{
    T c;
    pMethod aPointerToMember = &amp;T::method;
    (c.*aPointerToMember)();
}


int main()
{
    callingFunction&lt;C, &amp;C::method&gt;();

    return 0;
}
</code></pre>

<p>But I always get error when calling the function in main:</p>

<pre><code>error: no matching function for call to 'callingFunction()' // mingw
</code></pre>

<p>If The member function is not static it works, how can I make it work with static function ?  </p>

<p>Thanks.  </p>

<p>Thank you</p>
