FuncDoodle
Loading...
Searching...
No Matches
Ptr.h File Reference

Convenience type aliases for standard smart pointers. More...

#include <memory>

Go to the source code of this file.

Typedefs

template<typename T>
using UniquePtr = std::unique_ptr<T>
 Alias for an exclusively owned smart pointer.
template<typename T>
using SharedPtr = std::shared_ptr<T>
 Alias for a reference-counted shared smart pointer.
template<typename T>
using WeakPtr = std::weak_ptr<T>
 Alias for a non-owning observer of a SharedPtr.

Detailed Description

Convenience type aliases for standard smart pointers.

This header provides simple aliases over the C++ standard library smart pointers:

  • UniquePtr: exclusive ownership (std::unique_ptr)
  • SharedPtr: shared ownership with reference counting (std::shared_ptr)
  • WeakPtr: non-owning weak reference to a SharedPtr (std::weak_ptr)

These aliases are used throughout FuncDoodle to improve readability and allow future replacement with custom smart pointer implementations if needed.

Note
No additional behavior is added beyond std::smart pointers.

Typedef Documentation

◆ SharedPtr

template<typename T>
using SharedPtr = std::shared_ptr<T>

Alias for a reference-counted shared smart pointer.

◆ UniquePtr

template<typename T>
using UniquePtr = std::unique_ptr<T>

Alias for an exclusively owned smart pointer.

◆ WeakPtr

template<typename T>
using WeakPtr = std::weak_ptr<T>

Alias for a non-owning observer of a SharedPtr.