No description
Find a file
2026-01-16 16:00:41 -05:00
.github GitHub Classroom Feedback 2024-12-04 18:22:37 +00:00
.gitignore everything but calling the destructor correctly is handled 2026-01-16 16:00:41 -05:00
Makefile everything but calling the destructor correctly is handled 2026-01-16 16:00:41 -05:00
README.md started on rewrite 2026-01-14 14:36:04 -05:00
SharedPtr.hpp everything but calling the destructor correctly is handled 2026-01-16 16:00:41 -05:00
SharedPtr_test.cpp everything compiles, now need to figure out ref counting 2026-01-15 14:21:46 -05:00

std::shared_ptr impl for CS440

This repo contains code derived from the results of an assignment I completed as a part of my CS 440 class.

You will find the original CS 440 code at commit hash 74a843720e the code now is rewritten.

There are two files in this repo SharedPtr.hpp and SharedPtr_test.cpp the former is the implementation and the latter is a test file originally provided by the class

Building

The test executable can be build via make the only compiler which has been tested is clang version 21.1.6

What is implemented

  • Default and Raw pointer constructors
  • Copy and Move Constructors and assignment operators (incrementing counter on copy)
  • Destructor (decrementing counter if non-null)
  • Static and Dynamic pointer casts
  • Miscellaneous Pointer and Equality operations one would expect from a pointer