以下错误 C2248 的 bug 搜寻提示:'std::basic_ios<_Elem,_Traits>::basic_ios':无法访问类中声明的私有成员
Bughunting tips for: error C2248: 'std::basic_ios<_Elem,_Traits>::basic_ios' : cannot access private member declared in class
我正在将一个大型VC++6.0应用程序转换为VS2010,并在其中一个项目中不断运行此错误:
error C2248: 'std::basic_ios<_Elem,_Traits>::basic_ios' : cannot access private member declared in class 'std::basic_ios<_Elem,_Traits>'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:program files (x86)microsoft visual studio 10.0vcincludeios(176) : see declaration of 'std::basic_ios<_Elem,_Traits>::basic_ios'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> This diagnostic occurred in the compiler generated function 'std::basic_ofstream<_Elem,_Traits>::basic_ofstream(const std::basic_ofstream<_Elem,_Traits> &)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
根据错误文本和这里提出的类似问题,我假设错误是由直接传递到函数中的ofstream
实例引起的,而不是通过引用传递的。
我遇到的问题是,定位以错误方式传递ofstream
的代码行。错误消息只链接到VS2010中包含的fstream头,我的项目在数万行代码的代码库中到处使用ofstream
(没有一行是我写的)。
我会非常感谢任何帮助/提示/策略来定位这种类型的编译器错误。您将如何处理定位此类错误的问题?
您将如何处理定位此类错误的问题?
在源文件中执行grep
(regex搜索)以查找类似的内容
(([^,]+,)*, (std::)?of?stream [^&]
相关文章:
- 使用ios:ate写入到流会覆盖现有文件
- 如何访问RTCVideoRenderer的帧?(ios)
- 如何在Visual Basic中使用矩形函数OpenGL绘制矩形
- ios::fmtflags 在 C++ 中是如何工作的?setf() 是如何工作的?
- 我可以在 iOS 或 mac 应用程序中使用C++代码吗?
- "string.h"在构建适用于iOS的qt应用程序中找不到消息
- 为什么 C++ 11 在 ios 类中添加了运算符 bool
- 这是 basic.def.odr 部分的缺陷吗?
- 'string'文件在带有C++文件的iOS插件上找不到
- 文件模式标志"ios::app"是否用于删除文件(如果文件已存在)?
- 使用 C++ iOS::ate 获取错误的文件大小
- 使用 适用于 Android 和 iOS 的 tf-lite C++ API
- 未定义的对象(〔basic.life〕/8):为什么允许引用重新绑定(和常量修改)
- 如何正确设置 ios 标志以进行流操作?
- 在为 iOS 构建 aws-sdk-cpp 时,cmake 上的 CXX 编译器错误已损坏
- C++ std::locale( "en" ) 在 iOS 上引发异常
- 在瓦尔格林德的泄漏摘要中使用 std::ios::sync_with_stdio(fasle) 打印时获取"still reachable"
- 在iOS应用程序中创建数据库
- Qt & Firebase C++ SDK 在 iOS 上的链接问题
- 是否有可以在iOS上运行的API来更改现有视频的每秒帧数?