std::find 'erreur aucune fonction correspondante'

Dire que j'ai une classe A et une classe B qui ressemblent à ça:

Class A
{
private:
    int a;
public :
bool operator==(const A &) const;
//other methods(...)
}

Class B
{
private:
std::vector<A> v;
public:
std::vector<A> &get_v() {return v;};
const std::vector<A>& get_v() const;
}

Maintenant quand je fais ça:

B b;
std::vector<A>::iterator it;
it=std::find (b.get_v().begin(), b.get_v().end(), an item of class A);

L'erreur que j'obtiens est

error: no matching function for call to 'find(std::vector<A>::iterator, std::vector<A>::iterator, A&)

Suis-je raté quelque chose ? Grâce

InformationsquelleAutor chiva | 2014-02-06