title: The usage of class name with the overloaded parentheses
body: <p>In the following example, I understand how boost signal and functor work, however, my question is about how the class name with the overloaded parentheses <code>HelloWorld()</code> is used. As <code>HelloWorld</code> is a functor, the created object should actually use the <code>operator()</code>, not the class (functor) name. What is this practice called and what is its common application?</p>
  <pre><code>#include &lt;boost/signals2.hpp&gt;
  #include &lt;iostream&gt;
  struct HelloWorld 
  {
    void operator()(int val_) const 
    { 
      std::cout &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; val_  &lt;&lt; std::endl;
    } 
  };
  int main()
  {
  boost::signals2::signal&lt;void (int)&gt; sig;
  HelloWorld hello;
  hello(6);
  sig.connect(HelloWorld());
  sig(5);
  }
  </code></pre>