Force C++ language version?

We are try to using Visual Studio 2017 with ReSharper++ and VisualGDB for developing embedded application.

But RS++ not resolve current C++ version (C++17).

Is possible to force language version for project?

At the moment working with RC++ is very dificult.


Andrzej Tatar


Hello Andrzej,

At the moment R++ reads language version only from project settings. The feature request to implement a dedicated setting is

In your case you need to instruct VisualGDB to pass the "/std:c++17" command-line argument to IntelliSense. R++ will then pick it up and enable C++17 support.


It seems to me that RS++ resolved the correct C++ version.
My changes:
- added line in VS project : <LanguageStandard>stdcpplatest</LanguageStandard>
- forced included file that contains:
      #ifdef __cplusplus
      #undef __cplusplus
      #define __cplusplus 201704U


You are right, it looks like the value of __cplusplus is not defined according to the language standard with non-MSVC toolsets. I'll fix this in 2018.3 so the #ifdef is not necessary -

Note that you can also use the __RESHARPER__ macro to add defines just for R++, so something like this should also work:

#ifdef __RESHARPER__
#define __cplusplus 201704U

The __cplusplus define should no longer be necessary in EAP 7 (, the language standard option should be enough. Please let me know if you still experience the issue.


It seems to me that works good, but I had to turn off Visual Studio IntelliSense manually because red underscores (errors) were visible.

Now everything looks great.


Please sign in to leave a comment.