Skip to content

Commit

Permalink
use std::unordered_set instead of boost::unordered_set. Segfault on b…
Browse files Browse the repository at this point in the history
…oost 1.65.1
  • Loading branch information
hieuhoang committed Sep 26, 2017
1 parent cc15f07 commit d3c2c0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions moses2/HypothesisColl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ void HypothesisColl::Delete(const HypothesisBase *hypo)
//cerr << "hypo=" << hypo << " " << m_coll.size() << endl;

size_t erased = m_coll.erase(hypo);
//cerr << "erased=" << erased << " " << m_coll.size() << endl;

UTIL_THROW_IF2(erased != 1, "couldn't erase hypo " << hypo);
}

Expand Down
3 changes: 2 additions & 1 deletion moses2/HypothesisColl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Author: hieu
*/
#pragma once
#include <unordered_set>
#include <boost/unordered_set.hpp>
#include "HypothesisBase.h"
#include "MemPoolAllocator.h"
Expand Down Expand Up @@ -53,7 +54,7 @@ class HypothesisColl
std::string Debug(const System &system) const;

protected:
typedef boost::unordered_set<const HypothesisBase*,
typedef std::unordered_set<const HypothesisBase*,
UnorderedComparer<HypothesisBase>, UnorderedComparer<HypothesisBase>,
MemPoolAllocator<const HypothesisBase*> > _HCType;

Expand Down

0 comments on commit d3c2c0b

Please sign in to comment.