From 2d3948b98bb9e8c7bad60f1acd99ff0b42b3ae30 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Sun, 10 Nov 2013 00:58:44 -0500 Subject: guard against direct includes of tr1 --- decoder/decoder.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'decoder/decoder.cc') diff --git a/decoder/decoder.cc b/decoder/decoder.cc index 31e6dc46..2c0e07b7 100644 --- a/decoder/decoder.cc +++ b/decoder/decoder.cc @@ -1,6 +1,11 @@ #include "decoder.h" -#include +#ifdef HAVE_CXX11 +# include +#else +# include +namespace std { using std::tr1::unordered_map; } +#endif #include #include #include @@ -61,7 +66,6 @@ static const double kMINUS_EPSILON = -1e-6; // don't be too strict using namespace std; -using namespace std::tr1; namespace po = boost::program_options; static bool verbose_feature_functions=true; @@ -90,7 +94,7 @@ struct ELengthWeightFunction { } }; inline void ShowBanner() { - cerr << "cdec v1.0 (c) 2009-2011 by Chris Dyer\n"; + cerr << "cdec (c) 2009--2013 by Chris Dyer\n"; } inline string str(char const* name,po::variables_map const& conf) { -- cgit v1.2.3