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:
authorHieu Hoang <hieu@hoang.co.uk>2013-11-15 14:55:38 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-11-15 14:55:38 +0400
commit17887a27969e83f4100bd0f4af98986e33999fbe (patch)
tree0e5c67dbc799c2d339e6a0a25df9aaf8b17b9efc /search
parent3d37a8ffdaa2a0516c82796f33082d66fb67bf92 (diff)
replace nth_element() with macro that execute sort() instead for gcc 4.8.1 & 4.8.2
Diffstat (limited to 'search')
-rw-r--r--search/nbest.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/search/nbest.cc b/search/nbest.cc
index ec3322c97..acfc08049 100644
--- a/search/nbest.cc
+++ b/search/nbest.cc
@@ -1,6 +1,7 @@
#include "search/nbest.hh"
#include "util/pool.hh"
+#include "moses/Util.h"
#include <algorithm>
#include <functional>
@@ -16,7 +17,7 @@ NBestList::NBestList(std::vector<PartialEdge> &partials, util::Pool &entry_pool,
std::vector<PartialEdge>::iterator end;
if (partials.size() > keep) {
end = partials.begin() + keep;
- std::nth_element(partials.begin(), end, partials.end(), std::greater<PartialEdge>());
+ NTH_ELEMENT4(partials.begin(), end, partials.end(), std::greater<PartialEdge>());
} else {
end = partials.end();
}