Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/search
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2012-10-23 00:23:09 +0400
committerKenneth Heafield <github@kheafield.com>2012-10-23 00:25:52 +0400
commitc4416c85faac3383f030471543f17c5eb2d3b895 (patch)
tree3cf4d6364cba6533a6315c64975365c71c789350 /search
parent32885c185ee6c6b319fe85bb70ada9c04605f94e (diff)
Disable incremental search for Boost < 1.42
Diffstat (limited to 'search')
-rw-r--r--search/vertex_generator.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/search/vertex_generator.cc b/search/vertex_generator.cc
index 0945fe55d..e18010c38 100644
--- a/search/vertex_generator.cc
+++ b/search/vertex_generator.cc
@@ -4,6 +4,9 @@
#include "search/context.hh"
#include "search/edge.hh"
+#include <boost/unordered_map.hpp>
+#include <boost/version.hpp>
+
#include <stdint.h>
namespace search {
@@ -12,6 +15,7 @@ VertexGenerator::VertexGenerator(ContextBase &context, Vertex &gen) : context_(c
gen.root_.InitRoot();
}
+#if BOOST_VERSION > 104200
namespace {
const uint64_t kCompleteAdd = static_cast<uint64_t>(-1);
@@ -82,6 +86,18 @@ void AddHypothesis(ContextBase &context, Trie &root, PartialEdge partial) {
} // namespace
+#else // BOOST_VERSION
+
+struct Trie {
+ VertexNode *under;
+};
+
+void AddHypothesis(ContextBase &context, Trie &root, PartialEdge partial) {
+ UTIL_THROW(util::Exception, "Upgrade Boost to >= 1.42.0 to use incremental search.");
+}
+
+#endif // BOOST_VERSION
+
void VertexGenerator::FinishedSearch() {
Trie root;
root.under = &gen_.root_;