unordered_set of regex objects

Can anyone please help me how to create unordered_set<std::regex> objects.
My sample code ;

#include<iostream>
#include<unordered_set>
#include <regex>
using namespace std;

int main( )
{
std::unordered_set<std::regex> set;
return 0;
}

I am getting below error.
Error C2280 : 'std::hash<_Kty>::hash(const std::hash<_Kty> &)': attempting to reference a deleted function .tools\msvc\14.11.25503\include\unordered_set 91.


1.how can i solve this error for creating unordered_set of regex objects?
2.can we use obove syntax for creating set of regex objects? if possible,
pls provide sample code.
Why do you need a set of regexes? That's very unusual. Would this work instead?
1
2
std::unordered_map<std::string, std::regex> map;
map[pattern] = std::regex(pattern);
Topic archived. No new replies allowed.