Loading [MathJax]/extensions/tex2jax.js
WPILibC++ 2025.3.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
wpi::memory::unique_base_ptr< BaseType, RawAllocator > Class Template Reference

A std::unique_ptr that deletes using a RawAllocator and allows polymorphic types. More...

#include <wpi/memory/smart_ptr.hpp>

Inheritance diagram for wpi::memory::unique_base_ptr< BaseType, RawAllocator >:

Detailed Description

template<class BaseType, class RawAllocator>
class wpi::memory::unique_base_ptr< BaseType, RawAllocator >

A std::unique_ptr that deletes using a RawAllocator and allows polymorphic types.

It can only be created by converting a regular unique pointer to a pointer to a derived class, and is meant to be used inside containers. It is an alias template using allocator_polymorphic_deleter as Deleter class.

Note
It has a relatively high overhead, so only use it if you have to.

The documentation for this class was generated from the following file: