Lines Matching refs:T
21 template <typename T>
23 enum { type_must_be_complete = sizeof(T) };
25 void operator()(T* p) const { in operator()
31 template <typename T>
32 struct DefaultDelete<T[]> {
33 enum { type_must_be_complete = sizeof(T) };
34 void operator()(T* p) const {
47 template <typename T, typename D = DefaultDelete<T> >
51 explicit UniquePtr(T* ptr = nullptr) : mPtr(ptr) { }
53 UniquePtr(UniquePtr<T, D>&& that) {
63 T& operator*() const { return *mPtr; }
64 T* operator->() const { return mPtr; }
65 T* get() const { return mPtr; }
69 T* release() __attribute__((warn_unused_result)) {
70 T* result = mPtr;
78 void reset(T* ptr = nullptr) {
87 T* mPtr;
100 template <typename T, typename D>
101 class UniquePtr<T[], D> {
103 explicit UniquePtr(T* ptr = NULL) : mPtr(ptr) {
105 UniquePtr(UniquePtr<T, D>&& that) {
114 T& operator[](size_t i) const {
117 T* get() const { return mPtr; }
119 T* release() __attribute__((warn_unused_result)) {
120 T* result = mPtr;
125 void reset(T* ptr = NULL) {
133 T* mPtr;