X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmsvccompiler.cpp;h=0e1a1f4e94158136737a077bb17d7362d6036875;hb=1c66151c44b4f4fb567da5ec8b75f066cccc5421;hp=12668a639c6dfc7db8941be12627ef52b520ba20;hpb=62853c9bb228cbb541304e866036cd931e3f5500;p=builder.git diff --git a/source/msvccompiler.cpp b/source/msvccompiler.cpp index 12668a6..0e1a1f4 100644 --- a/source/msvccompiler.cpp +++ b/source/msvccompiler.cpp @@ -107,9 +107,9 @@ Task *MsvcCompiler::run(const Target &target) const if(binfo.standards.count(tag)) { - string std = get_item(binfo.standards, tag); - if(std!="c++11" && std!="c99") - argv.push_back("/std:"+std); + const BuildInfo::LanguageStandard &std = get_item(binfo.standards, tag); + if((tag=="CXX" && std.year>2011) || (tag=="CC" && std.year>1999)) + argv.push_back("/std:"+std.str()); } if(binfo.warning_level>=1)