Const Static Function Pointer in Class ~ How to initialize it?
<p>I have this small piece of code:</p>

<pre><code>int add(int x, int y)
{
    return x + y;
}

class A
{
public:
    const static int (*FP)(int, int) = &amp;add;
};

int main()
{
    int x = 3;
    int y = 2;
    int z = A::FP(x, y);
    return 0;
}
</code></pre>

<p>Under VS2012 this generates the following error:
error C2864: 'A::FP' : only static const integral data members can be initialized within a class.</p>

<p>Is there something I am not seeing? Or is it plainly not possible for some reason?</p>

<p>Christian</p>
