diff options
author | jiejiang <mail.jie.jiang@gmail.com> | 2014-01-16 05:08:01 +0400 |
---|---|---|
committer | jiejiang <mail.jie.jiang@gmail.com> | 2014-01-16 05:08:01 +0400 |
commit | c55161dff40ef01fea15d6c0a8ed30b8ce1c7d46 (patch) | |
tree | b62571d79d40397ca033090ab53ef1b4f4ebe0d6 | |
parent | 8486d30d7453198eff463caa85502d592e613ee9 (diff) | |
parent | c1d8f6e2679f55ad74919d81cb44c0a7789df89f (diff) |
merge c11 revert with mingw changesmingw-release-2.1.1
-rw-r--r-- | Jamroot | 1 | ||||
-rw-r--r-- | moses/Manager.cpp | 4 | ||||
-rw-r--r-- | phrase-extract/ScoreFeatureTest.cpp | 20 |
3 files changed, 10 insertions, 15 deletions
@@ -80,7 +80,6 @@ external-lib z ; lib dl : : <runtime-link>static:<link>static <runtime-link>shared:<link>shared ; requirements += <library>dl ; -requirements += <toolset>gcc:<cxxflags>-std=c++0x ; if ! [ option.get "without-tcmalloc" : : "yes" ] && [ test_library "tcmalloc_minimal" ] { diff --git a/moses/Manager.cpp b/moses/Manager.cpp index 38fe94618..ad64faa8e 100644 --- a/moses/Manager.cpp +++ b/moses/Manager.cpp @@ -1440,11 +1440,7 @@ void Manager::GetForwardBackwardSearchGraph(std::map< int, bool >* pConnected, } // end for hypo } // end for stack -#if __cplusplus >= 201103L - for (auto it = connectedList.begin(); it != connectedList.end(); ++it) { -#else for (std::vector< const Hypothesis *>::iterator it = connectedList.begin(); it != connectedList.end(); ++it) { -#endif float estimatedScore = (*it)->GetScore() + forwardScore[(*it)->GetId()]; estimatedScores.push_back(estimatedScore); } diff --git a/phrase-extract/ScoreFeatureTest.cpp b/phrase-extract/ScoreFeatureTest.cpp index d01a1e784..65f1f4437 100644 --- a/phrase-extract/ScoreFeatureTest.cpp +++ b/phrase-extract/ScoreFeatureTest.cpp @@ -52,13 +52,13 @@ BOOST_AUTO_TEST_CASE(manager_configure_domain_except) { //Check that configure rejects illegal domain arg combinations ScoreFeatureManager manager; - vector<string> args = {"--DomainRatio","/dev/null","--DomainIndicator","/dev/null"}; + vector<string> args = boost::assign::list_of("--DomainRatio")("/dev/null")("--DomainIndicator")("/dev/null"); BOOST_CHECK_THROW(manager.configure(args), ScoreFeatureArgumentException); - args = {"--SparseDomainSubset","/dev/null","--SparseDomainRatio","/dev/null"}; + args = boost::assign::list_of("--SparseDomainSubset")("/dev/null")("--SparseDomainRatio")("/dev/null"); BOOST_CHECK_THROW(manager.configure(args), ScoreFeatureArgumentException); - args = {"--SparseDomainBlah","/dev/null"}; + args = boost::assign::list_of("--SparseDomainBlah")("/dev/null"); BOOST_CHECK_THROW(manager.configure(args), ScoreFeatureArgumentException); - args = {"--DomainSubset"}; + args = boost::assign::list_of("--DomainSubset"); BOOST_CHECK_THROW(manager.configure(args), ScoreFeatureArgumentException); } @@ -80,17 +80,17 @@ static void checkDomainConfigured( BOOST_AUTO_TEST_CASE(manager_config_domain) { checkDomainConfigured<RatioDomainFeature> - ({"--DomainRatio","/dev/null"}); + (boost::assign::list_of ("--DomainRatio")("/dev/null")); checkDomainConfigured<IndicatorDomainFeature> - ({"--DomainIndicator","/dev/null"}); + (boost::assign::list_of("--DomainIndicator")("/dev/null")); checkDomainConfigured<SubsetDomainFeature> - ({"--DomainSubset","/dev/null"}); + (boost::assign::list_of("--DomainSubset")("/dev/null")); checkDomainConfigured<SparseRatioDomainFeature> - ({"--SparseDomainRatio","/dev/null"}); + (boost::assign::list_of("--SparseDomainRatio")("/dev/null")); checkDomainConfigured<SparseIndicatorDomainFeature> - ({"--SparseDomainIndicator","/dev/null"}); + (boost::assign::list_of("--SparseDomainIndicator")("/dev/null")); checkDomainConfigured<SparseSubsetDomainFeature> - ({"--SparseDomainSubset","/dev/null"}); + (boost::assign::list_of("--SparseDomainSubset")("/dev/null")); } |