I do such comparison of two std::set
#include
#include
using namespace std;
#include
#include
C++11 standard on ==
for std::set
Others have mentioned that operator==
does compare std::set
contents and works, but here is a quote from the C++11 N3337 standard draft which I believe implies that.
The quote is exactly the same as that for std::vector
which I have interpreted in full detail at: C++: Comparing two vectors
As a short summary to avoid duplication with that other answer:
equal()
for operator==
equal
and explicitly shows that it iterates over both containers comparing the elements of each