title: Why would you create a class with one single member which is an operator()?
body: <p>I have tried to find out -out there- a good technical reason for defining a class which contains only one member and this member happens to be a <code>operator()</code>.</p>
  
  <p>I stumbled upon someone who -for whatever the reason- created a namespace containing a couple of classes, but each class contains only one <code>operator()</code> as a member.</p>
  
  <p>It is clear to me that these classes might then be used as if they were methods (very likely), but why is this a good technical approach (I assume there is a good one), rather than simply defining a set of different methods within a singleton class which in this particular case would belong to the namespace I mentioned lines above.</p>
  
  <p>The namespace looks something like:</p>
  
  <pre><code>namespace myNamespace {
     class ClassA {
     public:
        void operator()();
     };
  
     class ClassB {
     public:
        int operator()(arg1, arg2);
     };
  
     ...
  }
  </code></pre>
  
  <p>Is this simply a matter of personal taste/style or is this the expression of advance/sophisticated design?
  I assume this design encompass some wise knowledge that I haven't gathered yet, but on the other hand I haven't found a piece of article or question discussing this - which makes me doubt about such "wise knowledge" in the design.</p>
  
  <p>What does the experts here have to say?</p>
  
  <p>Thanks in advance!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Hello again!
  I accept this question to be a REPEATED question, whose answer is found <a href="https://stackoverflow.com/questions/356950/c-functors-and-their-uses" title="C++ Functors - and their use">here</a>.</p>
  
  <p>The term Functor was unknown to me and while trying to find an answer to my doubt (prior to this question's submission), I did not see any references to this term.</p>
  
  <p>I still accept the answer from SergeyA, because his answer introduced me to the term and his explanation is answering my question. His answer -from my point of view- is extended by the answer found in the link I stated lines above.</p>
  
  <p>Thanks!</p>