From c52e6c92b08d28048047fa5642f16530bc81c5d7 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 10 Nov 2025 11:48:06 +0200 Subject: Add import std support to MSVC. --- mesonbuild/compilers/cpp.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mesonbuild/compilers/cpp.py') diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index 908d6dc45..bdf60f6c2 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -801,6 +801,13 @@ class VisualStudioLikeCPPCompilerMixin(CompilerMixinBase): std_opt = opts[self.form_compileropt_key('std')] assert isinstance(std_opt, options.UserStdOption), 'for mypy' std_opt.set_versions(cpp_stds) + + if version_compare(self.version, '>=19.44.35219'): + key = self.form_compileropt_key('importstd') + opts[key] = options.UserComboOption(self.make_option_name(key), + 'Use #import std.', + 'false', + choices=['false', 'true']) return opts def get_option_compile_args(self, target: 'BuildTarget', subproject: T.Optional[str] = None) -> T.List[str]: -- cgit v1.2.3