Skip to main content

All Questions

7 votes
1 answer
444 views

unique_ptr basic implementation for single objects

This is an implementation to simulate the basic functionality of unique_ptr. This doesn't provide features like custom deleter and ...
kapil's user avatar
  • 229
7 votes
3 answers
5k views

Custom std::shared_ptr<T> implementation

I'd like to get a few pointers about my code. I know that shared_ptr is up and running, and I'm reinventing the wheel but you can't say no to the school assignment. ...
gMD's user avatar
  • 71
14 votes
2 answers
29k views

My implementation for std::unique_ptr

I just finished learning about move semantics and realized that a nice practical example for this concept is unique_ptr (it cannot be copied, only moved). For ...
Matias Cicero's user avatar
4 votes
2 answers
2k views

Implementing a shared_ptr class in C++

I'm trying to write my own shared_ptr/weak_ptr implementation in C++. I have the following requirements: I do NOT need support for the following: multithreading (synchronisation) support for ...
Truncheon's user avatar
1 vote
3 answers
107 views

Implementing my own shared-ownership double-indirecting smart-pointer

I am implementing my own double-indirecting shared-ownership smart-pointer because I needed a way to replace the managed object a group of smart-pointers is pointing to with a new object (it's the ...
user6245072's user avatar
2 votes
1 answer
112 views

Pointer handle - absolute follow-up

This is a follow-up to: Pointer handle - follow-up Pointer class/handle Please review my pointer class. ...
lightning_missile's user avatar
4 votes
2 answers
102 views

Pointer handle - follow-up

This is a followup to: Pointer class/handle Please review this pointer class. ...
lightning_missile's user avatar
2 votes
1 answer
111 views

Pointer class/handle

Please review my pointer class. ...
lightning_missile's user avatar
6 votes
1 answer
91 views

Pointer handle - only allocates in stack

This is a pointer class of mine that I would like to have reviewed. Right now it only allocates in the stack and has no copy or move operations. ...
lightning_missile's user avatar
4 votes
1 answer
500 views

Yet another shared pointer

What might be wrong with this shared pointer? One good point of it might be, that it should handle array types correctly by default (e.g. ...
user1095108's user avatar
  • 1,434