title: Why have unary_function, binary_function been removed from C++11?
body: <p>I found that <code>binary_function</code> is removed from C++11. I am wondering why.</p>
  
  <p>C++98:</p>
  
  <pre><code>template &lt;class T&gt; struct less : binary_function &lt;T,T,bool&gt; {
    bool operator() (const T&amp; x, const T&amp; y) const {return x&lt;y;}
  };
  </code></pre>
  
  <p>C++11:</p>
  
  <pre><code>template &lt;class T&gt; struct less {
    bool operator() (const T&amp; x, const T&amp; y) const {return x&lt;y;}
    typedef T first_argument_type;
    typedef T second_argument_type;
    typedef bool result_type;
  };
  </code></pre>
  
  <p><strong>MODIFIED</strong>----------------------------------------------------------------------------</p>
  
  <pre><code>template&lt;class arg,class result&gt;
  struct unary_function
  {
         typedef arg argument_type;
         typedef result result_type;
  };
  </code></pre>
  
  <p>For example, if we want to write our adapter for function even in C++98,</p>
  
  <pre><code>template &lt;class T&gt; struct even : unary_function &lt;T,bool&gt; {
    bool operator() (const T&amp; x) const {return 0==x%2;}
  };
  
  find_if(bgn,end,even&lt;int&gt;()); //find even number
  
  //adapter
  template&lt;typename adaptableFunction &gt;
  class unary_negate
  {
     private:
         adaptableFunction fun_;
     public:
         typedef adaptableFunction::argument_type argument_type;
  
         typedef adaptableFunction::result_type result_type;  
         unary_negate(const adaptableFunction &amp;f):fun_(f){}
  
         bool operator()(const argument_type&amp;x) 
         {
             return !fun(x);
         }
  }
  
  find_if(bgn,end, unary_negate&lt; even&lt;int&gt; &gt;(even&lt;int&gt;()) ); //find odd number
  </code></pre>
  
  <p>How can we improve this in C++11 without <code>unary_function</code>? </p>