Skip to content

Specify Compiler Version #758

Answered by ken-matsui
oraqlle asked this question in Q&A
May 7, 2023 · 1 comments · 6 replies
Discussion options

You must be logged in to vote

@oraqlle No since we can specify the C++ version in edition. Poac automatically detects whether or not your compiler supports the specified edition. If your edition is 2020 but your GCC is 7, then the compilation fails. The logic is here:

case 2020:
if (version >= "11.1.0") {
return Ok(format("-std={}++20", specifier));
} else if (version >= "8.0.0") {
return Ok(format("-std={}++2a", specifier));
}
break;
}
return Err<error::UnsupportedLangVersion>(
COMPILER, version, lang::Lang::cxx, edition
);

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@ken-matsui
Comment options

@wx257osn2
Comment options

@oraqlle
Comment options

@ken-matsui
Comment options

@oraqlle
Comment options

Answer selected by oraqlle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants