Visual Studio 2015 IntelliSense 错误但解决方案编译
Visual Studio 2015 IntelliSense error but solution compiles
我知道已经有 但我已经尝试了所有建议,错误仍然显示在编辑器中,但解决方案编译正常。我的问题可能有点不同。
我有一个名为 getCurrentTime
的同名函数,在两个单独的文件中定义并继承给不同的 classes。这是它的样子:
NetworkClientState
使用 NetworkClient
基础 class 的 getCurrentTime
。
GameClient
以及 LinearPrediction
和 QuadraticPrediction
都使用 getCurrentTime
在 Prediction
基础中定义 class.
Intellisense 坚持下划线 Prediction::getCurrentTime
但程序编译并运行。虽然它会说 getCurrentTime
如果我去掉 using NetworkClient::getCurrentTime
是有歧义的。
我能做些什么来摆脱这个 Intellisense 错误?
我设法通过将 Prediction::getCurrentTime
弹出到 .cpp
文件中然后从头文件中删除声明来解决它。错误可能是由于多重继承而弹出的。
我知道已经有
我有一个名为 getCurrentTime
的同名函数,在两个单独的文件中定义并继承给不同的 classes。这是它的样子:
NetworkClientState
使用 NetworkClient
基础 class 的 getCurrentTime
。
GameClient
以及 LinearPrediction
和 QuadraticPrediction
都使用 getCurrentTime
在 Prediction
基础中定义 class.
Intellisense 坚持下划线 Prediction::getCurrentTime
但程序编译并运行。虽然它会说 getCurrentTime
如果我去掉 using NetworkClient::getCurrentTime
是有歧义的。
我能做些什么来摆脱这个 Intellisense 错误?
我设法通过将 Prediction::getCurrentTime
弹出到 .cpp
文件中然后从头文件中删除声明来解决它。错误可能是由于多重继承而弹出的。