summaryrefslogtreecommitdiff
path: root/mteval/ns_ter.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 /mteval/ns_ter.cc
parent074fa88375967adababc632ea763e9dea389831e (diff)
guard against direct includes of tr1
Diffstat (limited to 'mteval/ns_ter.cc')
-rw-r--r--mteval/ns_ter.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/mteval/ns_ter.cc b/mteval/ns_ter.cc
index 0e1008db..f0d84098 100644
--- a/mteval/ns_ter.cc
+++ b/mteval/ns_ter.cc
@@ -4,7 +4,12 @@
#include <cassert>
#include <iostream>
#include <limits>
-#include <tr1/unordered_map>
+#ifdef HAVE_CXX11
+# include <unordered_map>
+#else
+# include <tr1/unordered_map>
+namespace std { using std::tr1::unordered_map; }
+#endif
#include <set>
#include <boost/functional/hash.hpp>
#include "tdict.h"
@@ -20,7 +25,6 @@ static const unsigned kREF_WORDCOUNT = 4;
static const unsigned kDUMMY_LAST_ENTRY = 5;
using namespace std;
-using namespace std::tr1;
bool TERMetric::IsErrorMetric() const {
return true;