VS2017 IntelliSense不适用于C ++ 11,因为__cplusplus = 199711 [英] VS2017 IntelliSense does not work for C++11 because __cplusplus=199711

查看:665
本文介绍了VS2017 IntelliSense不适用于C ++ 11,因为__cplusplus = 199711的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VisualGDB使用VS2017 15.4.1开发C ++ 11 Linux应用程序,因为__cplusplus被定义为199711L而不是201304L,所以我得到了很多IntelliSense错误。我仍然能够成功编译我的代码,但我的C ++代码
充满了红色的摆动线。解决这个问题的一种方法是使用Clang IntelliSense,但我更喜欢VS的原生IntelliSense。



上一页:https://connect.microsoft.com/VisualStudio/反馈/详情/ 1031644
$


据我所知,这是在2014年之前提出的,微软的回应是不要改变__cplusplus,因为它可能会破坏其他代码,但可能是VS IntelliSense提供一种在项目属性中定义__cplusplus的方法?在预处理器定义下查看配置
属性> C / C ++>预处理器时,我可以设置值,它们由IntelliSense识别,但如果我尝试添加__cplusplus = 201304,则IntelliSense会忽略它。 />


这个问题会解决吗?

I am developing C++11 Linux applications with VS2017 15.4.1 using VisualGDB and I get a lot of IntelliSense errors because __cplusplus is defined as 199711L instead of 201304L. I am still able to successfully compile my code but my C++ code is riddled with the red wiggle lines. One way to work around this is to use the Clang IntelliSense but I much prefer VS's native IntelliSense.

Previous: https://connect.microsoft.com/VisualStudio/Feedback/Details/1031644

I understand that this has been asked before in 2014 and Microsoft's response was not to change __cplusplus because it could break other code, but could VS IntelliSense offer a way to define __cplusplus in the project properties? When looking at the Configuration Properties>C/C++>Preprocessor under Preprocessor Definitions I can set values and they are identified by IntelliSense but if I try to add __cplusplus=201304, it is ignored by IntelliSense.

Will this issue be resolved?

注意:我已经在反馈中心,但是当我点击提交时,我一直收到错误消息。如果这篇文章位于错误的位置,有人可以指示我到正确的位置。

Note: I have submitted this in the Feedback Center but when I click submit I keep getting an error. If this post is on the wrong location could someone please direct me to the correct location.

推荐答案

只是为了确定,你使用的是跨平台Linux项目,还是只是在VS中打开目录或单个源文件?

Just to be sure, are you using the cross platform Linux projects, or are you just opening the directory or individual source files in VS?


这篇关于VS2017 IntelliSense不适用于C ++ 11,因为__cplusplus = 199711的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆