Struct name used with round brackets and operator()
<p>I was using some numerical integration package in BOOST (See code below).
Anyone can explain the meaning of:</p>

<pre><code>double operator()(double x) {return x/std::log(x);}
</code></pre>

<p>What is this "operator()(double x)"??</p>

<pre><code>quadrature::adaptive()(f(), 0., 1., answer, error_estimate);
</code></pre>

<p>What is "f()" here?</p>

<hr>

<pre><code>#include &lt;boost/numeric/quadrature/adaptive.hpp&gt;
#include &lt;boost/numeric/quadrature/kronrodgauss.hpp&gt;
#include &lt;iostream&gt;
#include &lt;cmath&gt;

namespace quadrature=boost::numeric::quadrature;

struct f
{
  double operator()(double x) const { return x/std::log(x); }
};


int main()
{
  double answer, error_estimate;
  // integrate x/log(x) on [0,1]
  quadrature::adaptive()(f(), 0., 1., answer, error_estimate);

  std::cout &lt;&lt; "integtral(x/log(x)) on [0,1] is " &lt;&lt; answer
            &lt;&lt; " with error estimate " &lt;&lt; error_estimate
            &lt;&lt; std::endl;

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