Intellisense not working for C++11

Whenever I enable C++11 the __cppversion is not set to C++11 but the value is still 199711L thus all C++11 stuff gets the jiggly lines.
Also ANDOROID is not defined for intellisense but _WIN32 is. So there are lots of intellisense errors but the code compiles properly.

If it matters I add the AArch64 configuration to an existing project.

Thank you for the report - we’ll look into that.

To add to the above. I also get these errors:

Hello Zingram,

You’ve encountered 2 different kinds of issues which are caused by the limitations of Visual C++ compiler and IntelliSense parser:

  1. In case of Visual C++, __cplusplus compiler-defined macro is hard-coded to 199711L - that is the well-known Visual C++ bug http://stackoverflow.com/questions/14131454/visual-studio-2012-cplusplus-and-c-11 http://connect.microsoft.com/VisualStudio/feedback/details/763051/a-value-of-predefined-macro-cplusplus-is-still-199711l
  2. Visual C++ compiler and IntelliSense parser doesn't know anything about the GNU-specific compiler-defined macros, like va_args. You could solve these errors by adding the macro declarations to custom project-specific C++ hint file, as described on MSDN https://msdn.microsoft.com/en-us/library/dd997977.aspx Here are some examples: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcpackages\cpp.hint https://github.com/dotnet/coreclr/blob/master/src/jit/cpp.hint

I hope this will help!

Hi @MikhailFilimonov & Zingram,

#1 above is not a bug. The MSVC compiler defines __cplusplus to 199711L because we don’t yet have C++98 conformance. We’re still lacking two-phase name lookup and a conforming preprocessor. Until our compiler conforms to the standard we’ll stay at this value.

The good news is that we have been hard at work on conformance and expect to fully conform to C++14 (including C++11 and C++98) this year. We’ve also gotten a number of C++17 features implemented ready and are on-track to conform with C++17 around the time that ISO publishes the standard. Moreover, we’ve got a number of coming Technical Specifications implemented or in-progress including Coroutines, Modules, Ranges, and Concepts.

You can read more about MSVC’s conformance work in this blog post: C++ Standards Conformance from Microsoft - C++ Team Blog. And you’re welcome to email me at visualcpp at Microsoft if there’s anything I can do to help you with regards to MSVC. (A handful of us watch that email address. My direct mail is my NVidia Devtalk handle@microsoft.com.)

Thanks!

Andrew Pardoe
MSVC compiler & tools

apardoe

Andrew, thank you for the detailed explanation of the reasoning behind the default value of __cplusplus macro.
I would kindly ask you how we could switch the Visual Studio 2013/2015 IntelliSense parser into the C++ 11/14 compatible mode as by default it does not recognize at least some C++ 11/14 language constructs.

The IntelliSense compiler (EDG-based) tries to strictly emulate the behavior of the MSVC compiler (c1xx). There are some places where MSVC is ahead of or behind EDG in implementing modern language constructs but in general we try to keep the two compilers’ behavior in sync.

Behavior sets where MSVC is significantly different from EDG are kept behind off-by-default switches. For example, /experimental:module, /permissive-, and /std:c++latest are still in development so their behavior may not match IntelliSense exactly.

Are there particular language constructs you’re concerned about?