When using
unordered_map<int,int> mp;
or
unordered_set<int> s;
,I am getting the following error on mac :
error: no template named 'unordered_map'
Output for gcc --version :
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin20.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Code :
#include<bits/stdc++.h>
using namespace std;
int main(){
unordered_map<int,int> mp;
mp[1] = 2;
return 0;
}