Mysterious C++ syntax
<p>I am trying to walk through and understand a chi squared program that uses intrinsic for speed. In this process I have come across a line of code I can’t understand.</p>

<p>I have tried reviewing textbooks, Google and search of this site with no luck. I think the problem is that without knowing anything about the syntax, I can’t describes the search in terms or keyword sufficiently to get any pertinent results.</p>

<p>Here is the line of code I don’t understand:</p>

<pre><code>float (*chi2_float)(const int, const float*, const float*) = chi2_baseline_float;
</code></pre>

<p>And here is the function that contains it:</p>

<pre><code>float chi2_float(const int dim, const float* const x, const float* const y) {
    float (*chi2_float)(const int, const float*, const float*) = chi2_baseline_float;
#ifdef __SSE__
    chi2_float = chi2_intrinsic_float;
#endif
    return chi2_float(dim, x, y);
}
</code></pre>

<p>It looks to me that it is probably declaring and defining a function and when I comment out the line and re-compile I get:</p>

<p>error C2659: '=' : function as left operand
on line
    chi2_float = chi2_intrinsic_float;</p>

<p>I can send the .h file that contains this function if needed but it is as you would expect from the parameters.</p>

<p>Any help would be greatly appreciated.</p>
