腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
2
回答
将const std::
auto_ptr
<>作为std::
auto_ptr
<_Tp>::operator std::auto_ptr_ref<_Tp1>()的此参数传递会丢弃限定符
、
、
= std::
auto_ptr
<SnowTTan>*, bool <anonymous> = false]â:/usr/lib/gcc/x86_64-redhat-
linux
/4.4.6/../..
浏览 0
提问于2013-04-22
得票数 0
回答已采纳
1
回答
具有共同链接的非POD对象:应该发生什么?
这里有人在文件范围内写了以下内容:他们打算添加static,但忽略了它。然后,两个不同的
linux
共享库(每个库包含包含此声明的.o )最终链接到一个可执行文件。 这个项目的
auto_ptr
::~
auto_ptr
运行了两次,结果很不幸。
浏览 1
提问于2013-01-22
得票数 1
回答已采纳
1
回答
对于不推荐的c++11,什么是std::
auto_ptr
标准?
、
我有一些使用std::
auto_ptr
的代码,并在编译时给出了关于废弃std::
auto_ptr
的丑陋警告(GCC 4.7.1在Suse
Linux
12.2上)。struct AutoPtr#ifdef COMPILE_FOR_CX11#else#endif并将所有对std::
auto_ptr
<T>的引用替换为
浏览 0
提问于2013-07-12
得票数 1
回答已采纳
1
回答
简单
auto_ptr
、
、
我编写了我自己的简单
auto_ptr
类,但发现了一些魔力。{ A* ptr = 0;
auto_ptr
(A* p);
auto_ptr
(auto_ptr_ref
auto_ptr
::
auto_ptr
(auto_ptr& p) { p.release();
auto_ptr
::
auto_ptr
浏览 2
提问于2014-11-15
得票数 0
回答已采纳
1
回答
为什么
auto_ptr
中有模板复制构造函数和重写操作符函数?
、
为什么
auto_ptr
中有模板复制构造函数和重写操作符函数? template <class Y> struct auto_ptr_ref {};
auto_ptr
(auto_ptr&) throw(); template<cl
浏览 4
提问于2016-06-13
得票数 4
回答已采纳
2
回答
接受
auto_ptr
的构造函数
、
、
我想编写一个带有构造函数的C++类,该构造函数以
auto_ptr
作为其参数,这样我就可以将类实例从
auto_ptr
初始化到另一个实例:{ A() {}}; { return std::
auto_ptr
<A>(new<A>::
auto_ptr</
浏览 3
提问于2013-10-28
得票数 0
回答已采纳
1
回答
Ubuntu 19.04与R 3.6 -无法安装R闪亮软件包?
、
、
/3.6/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template<class> class std::
auto_ptr
’ is deprecatedcallback.cpp:1: template<typename> class
auto_pt
浏览 19
提问于2019-08-30
得票数 0
2
回答
如何删除由指针数组组成的成员变量
、
、
这个类的文档说这不是
auto_ptr
的STL向量。强烈建议使用STL向量来存储
auto_ptr
>当我访问auto_vector::operator成员函数时,我总是得到一个分段错误> GDB堆栈跟踪,如下所示显示了分段错误。[] ( size_t i ) return _arr[i]; void push_back ( std::
auto_ptr
<T>&shedskin__::setentry<__shedskin__::tuple2&l
浏览 6
提问于2011-02-16
得票数 0
回答已采纳
1
回答
为什么
auto_ptr
不正常的行为
、
、
首先,请确保您知道std::
auto_ptr
曾经有3个版本。第一个版本的std::
auto_ptr
如下所示:class
auto_ptr
public: template<class U>
auto_ptr
(
auto_ptr
<U>& rhs): pointee(rhs.release()) {}
浏览 0
提问于2013-09-07
得票数 0
回答已采纳
4
回答
auto_ptr
与shared_ptr的性能
、
、
、
、
我没有找到有关
auto_ptr
和shared_ptr性能问题的信息(我使用tr1实现)。因为shared_ptr比
auto_ptr
更复杂,所以
auto_ptr
更快?因此,一般来说,与
auto_ptr
相比,对于
auto_ptr
的性能,您能说些什么?PS:我知道现在unique_ptr比
auto_ptr
更好,但是并不是所有的编译器都支持它,所以问题是关于
auto_ptr
和shared_ptr。
浏览 4
提问于2012-06-12
得票数 1
回答已采纳
1
回答
关于
auto_ptr
的问题
、
假设我们有以下代码{}{ sink( source() ); vector<
auto_ptr</em
浏览 1
提问于2012-03-30
得票数 3
回答已采纳
2
回答
你能给我举一个auto_ptr_ref非常必要的例子吗?
我想更好地了解创建库背后的机制和问题,我决定从std::
auto_ptr
开始。我熟悉它的语法和用法,但是我正在努力理解它的实现细节。explicit
auto_ptr
(T* ptr = 0) throw() }
auto_ptr
<T>& operator=(
au
浏览 0
提问于2011-06-07
得票数 3
回答已采纳
2
回答
vector<
auto_ptr
<>的编译问题>
、
、
、
、
::allocator<std::
auto_ptr
<A> >]’ ..::__normal_iterator<std::
auto_ptr
<A>*, std::vector<std::
auto_ptr
<A>, std::allocator<std::
auto_ptr
<A>::__normal_iterator<std::
auto_ptr
<A>*, std::vector<std::
auto_ptr<
浏览 0
提问于2010-04-15
得票数 7
回答已采纳
2
回答
我编写了一个类来实现
auto_ptr
、
请帮助我查看此代码:#include <cassert>class
auto_ptr
{ explicit
auto_ptr
(T* p = NULL):m_p(p){} auto_ptr& operator<int> p1(new int(10));
浏览 0
提问于2013-08-14
得票数 5
1
回答
未定义的类的“`vtable”引用
我从cppfaq12.15获取代码,并试图编译,但在
linux
中获得了gcc版本4.8.4的错误。 #include<iostream>#include<memory> using namespace std; int i_; FredPtr Fred::crea
浏览 4
提问于2015-07-07
得票数 1
3
回答
函数接受可以接受std::
auto_ptr
<Base>的std::
auto_ptr
<Derived>函数。
、
我正在尝试创建一个函数,它将
auto_ptr
转换为Base类,我想用
auto_ptr
到Derived类来调用它。但是我没能把它做好。我试过在没有参考的情况下使用它:并参考如下:
浏览 10
提问于2014-01-10
得票数 2
回答已采纳
3
回答
是否可以在基类中定义副本构造函数,并仍然处理派生类环境?
、
、
、
我的班级结构如下: public:}; public: return std::
auto_ptr
<P>(new A(*this));}; public
浏览 3
提问于2019-12-19
得票数 0
回答已采纳
2
回答
空结构背后的目的?
、
来自
auto_ptr
标准库的C++声明 public: explicit
auto_ptr
(X* p =0) throw();
浏览 1
提问于2010-07-23
得票数 5
回答已采纳
1
回答
为什么它可以用GNU/C++编译,而不能用VC++2010 RTM编译?
、
、
.std::
auto_ptr
<int> source_int() { std::
auto_ptr
<Derived> source_derived() { std::
auto_ptr
<D
浏览 3
提问于2010-04-06
得票数 1
2
回答
如何禁用包含文件夹的警告?
、
、
、
无用的东西 :警告'std::
auto_ptr
<_Ty>::
auto_ptr
(std::auto_ptr_ref<_Ty>) C4350:行为更改:'std::
auto_ptr
<_Ty>::
auto_ptr
(std::
auto_ptr
<_Ty>抛出()‘调用,而不是’std::
auto_ptr
<_Ty>::
auto_ptr
(std::
auto_ptr
<_Ty>
浏览 7
提问于2011-03-01
得票数 5
回答已采纳
点击加载更多
相关
资讯
Linux DNS 查询剖析 Linux 中国
Manjaro Linux 22.0 发布|Linux 中国
Alpine Linux 3.18 发布|Linux 中国
Linux基础(3)linux命令3
linux高级课程-在Linux中编程
热门
标签
更多标签
云服务器
ICP备案
即时通信 IM
云直播
实时音视频
活动推荐
运营活动
广告
关闭
领券