64,677
社区成员
发帖
与我相关
我的任务
分享
#include <unordered_set>
#include <vector>
using namespace std;
namespace std
{
template <>
struct hash <std::vector<int>>
{
using result_type = size_t;
using argument_type = std::vector<int>;
size_t operator () (std::vector<int>const& key) const
{
// hasher for vector implementation.
return 0;
}
};
}
int main ()
{
unordered_set<vector<int>> my_set;
for(auto it = my_set.begin(); it != my_set.end(); ++it) {
int some_int = (*it).front();
}
}