MCPcopy Create free account
hub / github.com/audacity/audacity / Ptr

Class Ptr

libraries/lib-utility/PackedArray.h:128–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126template<typename Type,
127 template<typename> typename BaseDeleter = std::default_delete>
128struct Ptr
129 : std::unique_ptr<Type, Deleter<Type, BaseDeleter>>
130{
131 using
132 std::unique_ptr<Type, Deleter<Type, BaseDeleter>>::unique_ptr;
133
134 //! Enables subscripting. Does not check for null!
135 auto &operator[](size_t ii) const
136 {
137 return *(begin(*this) + ii);
138 }
139};
140
141//! Find out how many elements were allocated with a Ptr
142template<typename Type, template<typename> typename BaseDeleter>

Callers

nothing calls this directly

Calls 1

beginFunction · 0.70

Tested by

no test coverage detected