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
commit2d3948b98bb9e8c7bad60f1acd99ff0b42b3ae30 (patch)
tree22cd235bd6c94ee25c1ab9b2cf2a2d1d9aaec5c5 /decoder/ff_source_syntax_p.cc
parent074fa88375967adababc632ea763e9dea389831e (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) :