bool operator==(const Automobile& a){ if(modello != a.getModello()) return false; if(a.getComponenti().size() != componenti.size()) return false; List::const_iterator outit; List::const_iterator myit; for ( outit=a.begin() ; outit !=a.end(); outit++ ){ bool trovato = false; for( myit = componenti.begin(); myit != componenti.end(); myit++){ if(*outit == *myit) // Suppongo che Componente abbia l'operatore == giĆ  implementato trovato = true; } if(!trovato) return false; } return true; }