feat: c++20 support
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2022-10-04 21:31:28 +08:00
parent 3ce886327f
commit 6ad6eb2048
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
4 changed files with 12 additions and 4 deletions

View File

@ -452,12 +452,14 @@ int compile(const compile_config &conf) {
std::string lang = upgraded_lang(conf.lang);
if (lang == "C++" || lang == "C++03") {
if (lang == "C++" || lang == "C++14") {
return compile_cpp(conf, "c++14");
} else if (lang == "C++98") {
return compile_cpp(conf, "c++98");
} else if (lang == "C++03") {
return compile_cpp(conf, "c++03");
} else if (lang == "C++11") {
return compile_cpp(conf, "c++11");
} else if (lang == "C++14") {
return compile_cpp(conf, "c++14");
} else if (lang == "C++17") {
return compile_cpp(conf, "c++17");
} else if (lang == "C++20") {

View File

@ -512,10 +512,13 @@ function echoSubmissionContent($submission, $requirement) {
case 'C++':
case 'C++11':
case 'C++17':
case 'C++20':
case 'C++98':
case 'C++03':
$sh_class = 'sh_cpp';
break;
case 'Python2':
case 'Python2.7':
case 'Python3':
$sh_class = 'sh_python';
break;

View File

@ -1,6 +1,6 @@
<?php
global $uojSupportedLanguages, $uojMainJudgerWorkPath;
$uojSupportedLanguages = array('C', 'C++', 'C++11', 'C++17', 'C++98', 'Pascal', 'Python2', 'Python3');
$uojSupportedLanguages = array('C', 'C++', 'C++98', 'C++03', 'C++11', 'C++17', 'C++20', 'Pascal', 'Python2.7', 'Python3');
$uojMainJudgerWorkPath = "/opt/uoj/judger/uoj_judger";
function authenticateJudger() {

View File

@ -606,11 +606,14 @@ function get_codemirror_mode(lang) {
case 'C++':
case 'C++11':
case 'C++17':
case 'C++20':
case 'C++98':
case 'C++03':
return 'text/x-c++src';
case 'C':
return 'text/x-csrc';
case 'Python2':
case 'Python2.7':
case 'Python3':
return 'text/x-python';
case 'Pascal':