From 42d1e2e54392fea1f865e3c11f721cfc96eeeb59 Mon Sep 17 00:00:00 2001 From: "Bob Brown (DEVDIV)" Date: Mon, 7 Aug 2023 15:46:27 -0700 Subject: [PATCH] default to c++14 on mac for build and run active file --- Extension/src/LanguageServer/cppBuildTaskProvider.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Extension/src/LanguageServer/cppBuildTaskProvider.ts b/Extension/src/LanguageServer/cppBuildTaskProvider.ts index 992c6e4d6b..faffda2c64 100644 --- a/Extension/src/LanguageServer/cppBuildTaskProvider.ts +++ b/Extension/src/LanguageServer/cppBuildTaskProvider.ts @@ -180,6 +180,9 @@ export class CppBuildTaskProvider implements TaskProvider { isClang ? ['-fcolor-diagnostics', '-fansi-escape-codes', '-g', '${file}', '-o', programName] : ['-fdiagnostics-color=always', '-g', '${file}', '-o', programName]; + if (isClang && os.platform() === 'darwin') { + args.unshift('-std=c++14'); + } if (compilerArgs && compilerArgs.length > 0) { args = args.concat(compilerArgs); }