|
Boost Users : |
From: yinglcs2_at_[hidden]
Date: 2006-04-16 17:57:24
is there a better way to compare 2 stl list? I write a
function like
this below, but I wonder if there is a better way to
achieve that with boost(e.g.
less code)?
bool isSame(const list<int>& srcList, const
list<int>& destList ) {
if (srcList.size() != destList.size()) {
return false;
}
int size = srcList.size();
for (int i = 0; i < size; i++) {
if (srcList[i] != destList[i]) {
return false;
}
}
return true;
}
Thank you.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net