I am new to boost library and trying boost::scoped_ptr, it states this smart pointer cannot be copied or moved. But I was playing with some code and f ...
I am new to boost library and trying boost::scoped_ptr, it states this smart pointer cannot be copied or moved. But I was playing with some code and f ...
Suppose I have implemented a scoped_ptr: I want to test that the memory is actually freed after the pointer's lifetime is over, but I cannot verify ...
I am playing around with boost scoped pointers and I don't understand this behaviour: I get the following output: Shouldn't the reset function ...
I'm surprised the compiler refuses to compile this kind of code : Why this is not possible ? What is the best way to do that ? I found this soluti ...
As I understand it, if I have a class that has a boost::scoped_ptr member variable, and if I were to copy an instance of that class and would like the ...
I'm studying smart pointers, in particular scoped_ptr. I read about the operators * and ->. I tried to run this code: And the result is: That ...
I have the following code and line 2 gives me an error during compilation. Is it possible to create a map of scoped pointers or do I have to use share ...
Consider the following code snippet. The destructor of boost::scoped_ptr is invoked at the end of the main function. The destructor uses boost::checke ...
Is there a halfway elegant way to upgrade to following code snipped by the use of boost's scoped_ptr or scoped_array? ...
Actually when writting this question, another question a shorter one came to my mind so i will ask it first: 1st Question (Shorter): I have a header ...
I have this: What is the cleanest more STLish way to initialize the array. Note that the code is performance sensitive and using vector is not an o ...
In boost::scoped_ptr, says "It supplies a basic "resource acquisition is initialization" facility, without shared-ownership or transfer-of-ownership s ...
There is some disagreement in my team about pointer container usage for a particular context. Please consider: (I hope you can understand the speci ...
The below code is working fine: But the below statements are not working: I am getting compilation error like below: Please help me to solve ...
I'm reading about boost smart pointers, and one thing I'm not able to grasp is why boost::scoped_ptr can't be used with STL containers? I have read it ...
If often find myself using code like this: Now, I think the smart pointers could easily define an implicit conversion operator back to the 'raw' po ...
I have just started using c++ boost libraries. I read in many places that when a scoped_ptr is used then the object is always destroyed even in case o ...
Assuming shared pointer can be created as follows I need to pass the shared pointer which will allocate memory Pointed by the ptr. Something like t ...
I have working in large application which contain c and cpp. The all files saved as cpp extension but the code is written in c- style. I mean it is de ...
I want to use smart pointer in my c++ application. Which header file I should include for using std scoped_ptr? ...