Merge pull request #1503 from continue98/cppdialect-update
Update cxx standard;
This commit is contained in:
commit
55b714d9a5
@ -456,7 +456,7 @@
|
||||
|
||||
if cfg.cppdialect and cfg.cppdialect ~= "Default" then
|
||||
local cppMap = {
|
||||
["C++latest"] = "c++17", -- TODO: keep this up to date >_<
|
||||
["C++latest"] = "c++20",
|
||||
["C++98"] = "c++98",
|
||||
["C++0x"] = "c++11",
|
||||
["C++11"] = "c++11",
|
||||
|
@ -255,7 +255,7 @@
|
||||
Context = "-checkaction=context",
|
||||
},
|
||||
cppdialect = {
|
||||
["C++latest"] = "-extern-std=c++17", -- TODO: keep this up to date >_<
|
||||
["C++latest"] = "-extern-std=c++20", -- TODO: keep this up to date >_<
|
||||
["C++98"] = "-extern-std=c++98",
|
||||
["C++0x"] = "-extern-std=c++11",
|
||||
["C++11"] = "-extern-std=c++11",
|
||||
|
@ -212,6 +212,7 @@
|
||||
["gnu++17"] = "-std=gnu++17",
|
||||
["gnu++2a"] = "-std=gnu++2a",
|
||||
["gnu++20"] = "-std=gnu++20",
|
||||
["C++latest"] = "-std=c++20",
|
||||
},
|
||||
rtti = {
|
||||
Off = "-fno-rtti"
|
||||
|
@ -830,6 +830,13 @@
|
||||
test.contains({ }, gcc.getcflags(cfg))
|
||||
end
|
||||
|
||||
function suite.cxxflags_onCppLatest()
|
||||
cppdialect "C++latest"
|
||||
prepare()
|
||||
test.contains({ "-std=c++20" }, gcc.getcxxflags(cfg))
|
||||
test.contains({ }, gcc.getcflags(cfg))
|
||||
end
|
||||
|
||||
function suite.cxxflags_onCppGnu98()
|
||||
cppdialect "gnu++98"
|
||||
prepare()
|
||||
|
Loading…
Reference in New Issue
Block a user