summaryrefslogtreecommitdiff
path: root/decoder/ff_source_syntax_p.cc
diff options
context:
space:
mode:
authorChris Dyer <cdyer@Chriss-MacBook-Air.local>2013-11-10 00:58:44 -0500
committerChris Dyer <cdyer@Chriss-MacBook-Air.local>2013-11-10 00:58:44 -0500
commitd9cc1a6986188a97e09e4c8cef46c34eee5f9cd2 (patch)
tree662e45620fcf5b27f6a6edb5a5c105a0514e51cd /decoder/ff_source_syntax_p.cc
parentdb0dcd780abea416cfdb2b2382152dbe11c35170 (diff)
guard against direct includes of tr1
Diffstat (limited to 'decoder/ff_source_syntax_p.cc')
-rw-r--r--decoder/ff_source_syntax_p.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/decoder/ff_source_syntax_p.cc b/decoder/ff_source_syntax_p.cc
index cd081544..1d3dc497 100644
--- a/decoder/ff_source_syntax_p.cc
+++ b/decoder/ff_source_syntax_p.cc
@@ -2,7 +2,12 @@
#include <sstream>
#include <stack>
-#include <tr1/unordered_set>
+#ifdef HAVE_CXX11
+# include <unordered_set>
+#else
+# include <tr1/unordered_set>
+namespace std { using std::tr1::unordered_map; using std::tr1::unordered_set; }
+#endif
#include "sentence_metadata.h"
#include "array2d.h"
@@ -139,7 +144,7 @@ struct PSourceSyntaxFeaturesImpl {
Array2D<WordID> src_tree; // src_tree(i,j) NT = type
// mutable Array2D<int> fids_cat; // this tends to overfit baddly
mutable Array2D<map<const TRule*, int> > fids_ef; // fires for fully lexicalized
- tr1::unordered_set<int> feature_filter;
+ unordered_set<int> feature_filter;
};
PSourceSyntaxFeatures::PSourceSyntaxFeatures(const string& param) :