title: std::vector of std::functions find
body: <p>I have a vector populated with callback functions and I would like to check whether callback to the function already exists prior to adding it. I don't know whether it will even work bu so far it doesn't even compile.</p>
  
  <pre><code>vector&lt;std::function&lt;void(void*)&gt;&gt; _callbacks;
  
  void Event::RegisterCallback(std::function&lt;void(void*)&gt; callback)
  {
      if (callback == NULL)
          return;
  
      vector&lt;std::function&lt;void(void*)&gt;&gt;::iterator it = std::find(_callbacks.begin(), _callbacks.end(), callback);
  
      if (it == _callbacks.end())
      {
          _callbacks.push_back(callback);
      }
      else
      {
          //print error
          throw;
      }
  }
  </code></pre>
  
  <p>This gives a compile error:
  "Overload resolution selected deleted operator '=='" in alorithm(805). This is related to the find function call.</p>
  
  <p>How do I get this to work and is it even going to compare function calls to the same method properly?</p>
  
  <p>Thanks</p>