The following program does not compile an unordered set of pairs of integers, but it does for integers. Can unordered_set and its member functions be used on us
Your code compiles on VS2010 SP1 (VC10), but it fails to compile with GCC g++ 4.7.2.
However, you may want to consider boost::hash from Boost.Functional to hash a std::pair (with this addition, your code compiles also with g++).
#include
#include
class A
{
private:
std::unordered_set<
std::pair,
boost::hash< std::pair >
> u_edge_;
};