Unneeded. Vectors are a type of EqualityComparable.
http://www.sgi.com/tech/stl/EqualityComparable.html If a particular implementation of the stl isn't c++98 compliant, a global template<typename T> bool operator==( const vector<T> &a, const vector<T> &b) can be written (and operator!= of course).
This commit is contained in:
@@ -505,21 +505,6 @@ void FileWrite( RageFileBasic& f, float fWrite );
|
||||
bool FileCopy( const RString &sSrcFile, const RString &sDstFile );
|
||||
bool FileCopy( RageFileBasic &in, RageFileBasic &out, RString &sError, bool *bReadError = NULL );
|
||||
|
||||
template<class T>
|
||||
bool VectorsAreEqual( const T &a, const T &b )
|
||||
{
|
||||
if( a.size() != b.size() )
|
||||
return false;
|
||||
|
||||
for( unsigned i=0; i<a.size(); i++ )
|
||||
{
|
||||
if( a[i] != b[i] )
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void GetAsNotInBs( const vector<T> &as, const vector<T> &bs, vector<T> &difference )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user