diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2017-01-10 19:31:33 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2017-01-10 19:31:33 +0300 |
commit | 4910a385906d68caa8f9b54dc6aaeb44b205a9c5 (patch) | |
tree | 3ec2f099e43d469a8eccf055240de11ce359c593 | |
parent | 4d13377ce8a42eff71fd1ad57915198d1f681fbc (diff) |
enable C++11
-rw-r--r-- | Jamroot | 2 | ||||
-rw-r--r-- | phrase-extract/ScoreFeatureTest.cpp | 10 |
2 files changed, 5 insertions, 7 deletions
@@ -111,7 +111,7 @@ external-lib z ; #lib dl : : <runtime-link>static:<link>static <runtime-link>shared:<link>shared ; #requirements += <library>dl ; -#requirements += <cxxflags>-std=c++0x ; +requirements += <cxxflags>-std=c++0x ; # Allow moses to report the git commit hash of the version used for compilation moses_githash = [ _shell "git describe --dirty" ] ; diff --git a/phrase-extract/ScoreFeatureTest.cpp b/phrase-extract/ScoreFeatureTest.cpp index 60d931438..f82448ab0 100644 --- a/phrase-extract/ScoreFeatureTest.cpp +++ b/phrase-extract/ScoreFeatureTest.cpp @@ -26,8 +26,8 @@ #include <boost/test/unit_test.hpp> #include <boost/assign/list_of.hpp> -//#include <unordered_set> -//#include <unordered_map> +#include <unordered_set> +#include <unordered_map> using namespace MosesTraining; using namespace std; @@ -83,7 +83,6 @@ static void checkDomainConfigured( BOOST_CHECK(manager.includeSentenceId()); } -/* template<typename T> T adder(T v) { @@ -95,7 +94,7 @@ T adder(T first, Args... args) { return first + adder(args...); } -*/ + BOOST_AUTO_TEST_CASE(manager_config_domain) { @@ -112,7 +111,6 @@ BOOST_AUTO_TEST_CASE(manager_config_domain) checkDomainConfigured<SparseSubsetDomainFeature> (boost::assign::list_of("--SparseDomainSubset")("/dev/null")); - /* // C++11 testing unordered_set<int> s; s.insert(4); @@ -137,6 +135,6 @@ BOOST_AUTO_TEST_CASE(manager_config_domain) std::string s1 = "x", s2 = "aa", s3 = "bb", s4 = "yy"; std::string ssum = adder(s1, s2, s3, s4); - */ + } |