Why doesn't unary_function define operator()?
<p>I was just looking for a handy base class for a set of functors to be based on taking and int and returning void. </p>

<p>Thinking to use std/functional the functors are basically going to be <code>unary_function&lt;int,void&gt;</code> with <code>operator()</code>.</p>

<p>Why is <code>virtual result_type operator()(const argument_type&amp; _Left) const = 0;</code> not defined on the unary_function template?  I'm guessing that it's because there could be variations in constness...<br>
Is there some other template I've missed that includes the <code>operator()</code>?</p>

<p>I haven't done this in a while, am I missing something? </p>

<p>How would I also make use of existing functional like </p>

<pre><code>std::ptr_fun&lt; HWND, void &gt;(someFunction);
std::pointer_to_unary_function&lt;HWND, void&gt;(someFunction);
</code></pre>

<p><strong>EDIT:</strong> 
Perhaps I should include the other half of the usage to make this complete.  Maybe it's the usage half that is not fitting in with the concept.</p>

<p>How would one pass the functor to a method and use it?</p>

<pre><code>typedef unary_function&lt;int,void&gt; Functor;

void DoStuff(const Functor&amp; functor) {
  int demo = 1;
  functor(demo);
}
</code></pre>

<p>functor as a unary_function doesn't define operator() and so DoStuff doesn't compile.</p>
