cptr::deleter

A deleter that calls destroy(), so that std::unique_ptr can own an object created by make(). Its pointer is ptr, so the unique_ptr itself is 4 bytes.

Synopsis

Declared in <cptr/ptr.hpp>

template<
    class T,
    class Cage = default_cage>
struct deleter;

Description


using owner = std::unique_ptr<node, cptr::deleter<node>>;
owner n(cptr::make<node>());

Type Aliases

NameDescription
pointer The pointer type std::unique_ptr stores.

Member Functions

NameDescription
deleter [constructor]Constructors
operator() destroy(p).