Skip to content

Commit d3c2c0b

Browse files
committed
use std::unordered_set instead of boost::unordered_set. Segfault on boost 1.65.1
1 parent cc15f07 commit d3c2c0b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

moses2/HypothesisColl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ void HypothesisColl::Delete(const HypothesisBase *hypo)
254254
//cerr << "hypo=" << hypo << " " << m_coll.size() << endl;
255255

256256
size_t erased = m_coll.erase(hypo);
257+
//cerr << "erased=" << erased << " " << m_coll.size() << endl;
258+
257259
UTIL_THROW_IF2(erased != 1, "couldn't erase hypo " << hypo);
258260
}
259261

moses2/HypothesisColl.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Author: hieu
66
*/
77
#pragma once
8+
#include <unordered_set>
89
#include <boost/unordered_set.hpp>
910
#include "HypothesisBase.h"
1011
#include "MemPoolAllocator.h"
@@ -53,7 +54,7 @@ class HypothesisColl
5354
std::string Debug(const System &system) const;
5455

5556
protected:
56-
typedef boost::unordered_set<const HypothesisBase*,
57+
typedef std::unordered_set<const HypothesisBase*,
5758
UnorderedComparer<HypothesisBase>, UnorderedComparer<HypothesisBase>,
5859
MemPoolAllocator<const HypothesisBase*> > _HCType;
5960

0 commit comments

Comments
 (0)