auto-ptr
Should I explicitly zero initialize auto_ptr?
Some of my colleagues p开发者_如何学JAVArefer to explicitly initialize std::auto_ptr to 0 in constructor initialization list, but it will be initialized to 0 in it\'s constructor without any explicit[详细]
2023-04-11 17:08 分类:问答std::auto_ptr<T> Usage
I\'ve read a reasonable amount in decent textbooks about the aut开发者_开发知识库o_ptr class.While I understand what it is, and how it gets you around the problem of getting exceptions in places like[详细]
2023-03-29 15:06 分类:问答C++ Is using auto_ptr references as out variables idiomatic?
Suppose I want to write factory method that is supposed to allocate heterogeneous objects on the heap and return them to the caller. I am thinking of designing the API like this:[详细]
2023-03-20 11:30 分类:问答Incomplete type using typedef function pointer
I\'ve got an abstract base class that defines an interface to data sinks.Concrete implementations of data sinks are acquired via factories.In an effort to tidy up code, I created a typedef for the fac[详细]
2023-03-10 23:40 分类:问答how this auto_ptr program works and what it does?
I ran this program but I didn\'t get what this auto_ptr does and 开发者_Go百科on which basics it shows the values?[详细]
2023-03-09 03:28 分类:问答Delete raw pointer argument to boost::bind
Lets say I have heap allocated A*, which I want to pass as argument to boost::bind. boost::bind is saved for later processing in some STL like container of boost::functions\'s.[详细]
2023-03-04 21:50 分类:问答Deletion of pointer to incomplete type and smart pointers
When trying to use an auto_ptr with a type that was declared with forward-declaration, like this: class A;[详细]
2023-02-24 00:37 分类:问答'no matching function for call to' error with g++ : constructor or operator = not matching?
I have a assignment operator. AP<T>& operator=(AP<T>& o) {Super::operator=(o); return *this; }[详细]
2023-02-18 11:47 分类:问答Why operator [] is not allowed on std::auto_ptr
Why operator [] is not allowed on std::auto_ptr?开发者_JS百科 #include <iostream> using namespace std ;[详细]
2023-02-18 01:32 分类:问答Pass pointer to auto_ptr with C++
i have a function that does this: static MyClass* MyFunction(myparams) { return new MyClass(myparams) } and i would be able to call this function inside another one that has the following signature[详细]
2023-02-09 23:58 分类:问答