enable C++11

This commit is contained in:
Hieu Hoang 2017-01-10 16:31:33 +00:00
parent 4d13377ce8
commit 4910a38590
2 changed files with 5 additions and 7 deletions

View File

@ -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" ] ;

View File

@ -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);
*/
}