C++ unordered_map emplace() function throwing seg fault and I have no idea why

I am getting a seg fault while using std::unordered_map::emplace(). Here is the minimal reproducible example: #include <iostream> #include <string> #include <unordered_map> using namespace std; class WordTable { public: WordTable() { total = 0; } ~WordTable() {} void addWord(const string word, const int incr = 1) { cout << “begin emplace” << endl; table.emplace(word, Node()); //this…

Details