summaryrefslogtreecommitdiff
path: root/decoder/ff_source_syntax2_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_syntax2_p.cc
parentdb0dcd780abea416cfdb2b2382152dbe11c35170 (diff)
guard against direct includes of tr1
Diffstat (limited to 'decoder/ff_source_syntax2_p.cc')
-rw-r--r--decoder/ff_source_syntax2_p.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/decoder/ff_source_syntax2_p.cc b/decoder/ff_source_syntax2_p.cc
index dfa791ea..130144fa 100644
--- a/decoder/ff_source_syntax2_p.cc
+++ b/decoder/ff_source_syntax2_p.cc
@@ -3,7 +3,12 @@
#include <sstream>
#include <stack>
#include <string>
-#include <tr1/unordered_set>
+#ifdef HAVE_CXX11
+# include <unordered_set>
+#else
+# include <tr1/unordered_set>
+namespace std { using std::tr1::unordered_set; }
+#endif
#include "sentence_metadata.h"
#include "array2d.h"
@@ -133,8 +138,7 @@ struct PSourceSyntaxFeatures2Impl {
Array2D<WordID> src_tree; // src_tree(i,j) NT = type
mutable Array2D<map<const TRule*, int> > fids_ef; // fires for fully lexicalized
- tr1::unordered_set<int> feature_filter;
-
+ unordered_set<int> feature_filter;
};
PSourceSyntaxFeatures2::PSourceSyntaxFeatures2(const string& param) :