Skip to content

Commit

Permalink
MSVC does not support C++23 yet, fallback on C++20
Browse files Browse the repository at this point in the history
  • Loading branch information
poppolopoppo committed Jul 24, 2024
1 parent 2cbb5cb commit ac8c3fb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/hal/windows/MSVC.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,11 @@ func (msvc *MsvcCompiler) CppStd(f *Facet, std CppStdType) {
std = maxSupported
}
switch std {
case CPPSTD_LATEST, CPPSTD_23:
f.AddCompilationFlag("/std:c++23")
case CPPSTD_20:
case CPPSTD_23:
// f.AddCompilationFlag("/std:c++23") // still not supported as of 07/24/24
base.LogWarningOnce(LogWindows, "%v: c++23 is still not supported by MSVC v%v, fallback on C++20", f, msvc.MSC_VER)
fallthrough // fallback on C++20 for the moment
case CPPSTD_20, CPPSTD_LATEST:
f.AddCompilationFlag("/std:c++20")
case CPPSTD_17:
f.AddCompilationFlag("/std:c++17")
Expand Down

0 comments on commit ac8c3fb

Please sign in to comment.