title: std::find_if compare function compiler error
body: <p>I'm writing a simple program to familiarize with c++ and its core libraries, since i just started looking at it.</p>
  
  <p>Following <a href="https://stackoverflow.com/questions/14322299/c-stdfind-with-a-custom-comparator">C++ std::find with a custom comparator</a> accepted answer ( <a href="https://stackoverflow.com/a/14322617/611901">https://stackoverflow.com/a/14322617/611901</a> ) I wrote </p>
  
  <pre><code>struct special_compare : public std::unary_function&lt;composerRating, bool&gt;
      {
          explicit special_compare(size_t id) : id_(id) {}
          bool operator() (const composerRating &amp;cr_arg) const {
              return cr_arg.composerID == id_;
          }
          size_t id_;
      };
  
      vector&lt;composerRating&gt;::iterator crIter = find_if(ratings.begin, ratings.end(), special_compare(ID));
  </code></pre>
  
  <p>But the compiler complains that <code>find_if</code> doesn't take this kind of arguments. I saw on other answers that they use bind, but it is used when they need to call the member of a class, while I'm passing the class (struct) itself. In addition, I would prefer to avoid to use boost since I'm just writing a few lines program and it seams that std::bind is not in the scope of the function, and I didn't find a bind library.</p>
  
  <p>What should I do to solve the problem?</p>