ICode9

精准搜索请尝试: 精确搜索
  • c-带Swig的auto_ptr2019-10-12 04:10:07

    我正在尝试包装使用auto_ptr的C库.我在喝酒 并希望生成python绑定.我看过swig文档中有关如何将swig与智能指针here一起使用的部分.但是我无法使其工作. Swig生成想要使用const初始化auto_ptr的代码参考,但auto_ptr使用非常量定义了复制构造函数参考例如auto_ptr(auto_ptr&).产生的

  • c – 关于auto_ptr的问题2019-08-26 12:04:32

    假设,我们有以下代码 auto_ptr<T> source() { return auto_ptr<T>( new T(1) ); } void sink( auto_ptr<T> pt ) { } void f() { auto_ptr<T> a( source() ); sink( source() ); sink( auto_ptr<T>( new T(1) ) ); vector< auto_ptr<T

  • 函数中的C auto_ptr(作为参数和返回值)2019-08-23 07:06:43

    我试图在我的代码中使用auto_ptr,但显然出了问题. auto_ptr<ClassType> Class(s.Build(aFilename)); //Instantiation of the Class object int vM = s.GetM(Class); int vS = s.Draw(Class); 奇怪的是,在实例化Class之后,Class对象就存在了 通过调用s.GetModelMean(Class),Class

  • c – auto_ptr无法正常工作 – 编译错误2019-07-28 14:08:17

    大规模编辑: 在juanchopanza建议之后,我设法得到了这个最小的例子: #include <memory> struct a{ int b; }; int main() { typedef std::auto_ptr<a> ArgAutoPtr; ArgAutoPtr floatingArg; floatingArg = ArgAutoPtr( new a ); } 这给了我错误: no match for

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有