From ac8c3fb0c64010f83bd5715fef3836caf935b07d Mon Sep 17 00:00:00 2001 From: poppolopoppo Date: Wed, 24 Jul 2024 23:05:22 +0200 Subject: [PATCH] MSVC does not support C++23 yet, fallback on C++20 --- internal/hal/windows/MSVC.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/hal/windows/MSVC.go b/internal/hal/windows/MSVC.go index a35c38f..69fdb18 100644 --- a/internal/hal/windows/MSVC.go +++ b/internal/hal/windows/MSVC.go @@ -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")