diff options
Diffstat (limited to 'src/generator.hpp')
-rw-r--r-- | src/generator.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/generator.hpp b/src/generator.hpp index bed048f..5f2cb22 100644 --- a/src/generator.hpp +++ b/src/generator.hpp @@ -67,7 +67,7 @@ private: std::set<item_t> get_set(const std::string &nonterm); std::pair<std::map<std::set<item_t>, size_t>::iterator, bool> add_set(const std::set<item_t> &set) { - return itemsets.emplace(set, itemsets.size()); + return itemsets.insert(std::make_pair(set, itemsets.size())); } void add_reduction(size_t from, size_t to) { @@ -76,7 +76,7 @@ private: if (shift_conflicts.count(from)) throw conflict_error("shift/reduce conflict"); - reductions.emplace(from, to); + reductions.insert(std::make_pair(from, to)); } void add_shift(size_t from, const symbol_t &sym, size_t to) { @@ -84,11 +84,11 @@ private: throw conflict_error("shift/reduce conflict"); shift_conflicts.insert(from); - shifts.emplace(std::make_pair(from, sym), to); + shifts.insert(std::make_pair(std::make_pair(from, sym), to)); } void add_goto(size_t from, const std::string &nonterm, size_t to) { - gotos.emplace(std::make_pair(from, nonterm), to); + gotos.insert(std::make_pair(std::make_pair(from, nonterm), to)); } void generate_itemsets(); |