Lines Matching refs:C
46 template <class C> class scoped_ptr;
47 template <class C, class Free> class scoped_ptr_malloc;
48 template <class C> class scoped_array;
50 template <class C>
51 scoped_ptr<C> make_scoped_ptr(C *);
61 template <class C>
65 typedef C element_type;
70 explicit scoped_ptr(C* p = NULL) : ptr_(p) { } in ptr_()
75 enum { type_must_be_complete = sizeof(C) }; in ~scoped_ptr()
82 void reset(C* p = NULL) {
84 enum { type_must_be_complete = sizeof(C) };
92 C& operator*() const {
96 C* operator->() const {
100 C* get() const { return ptr_; } in get()
105 bool operator==(const C* p) const { return ptr_ == p; }
106 bool operator!=(const C* p) const { return ptr_ != p; }
110 C* tmp = ptr_; in swap()
120 C* release() { in release()
121 C* retVal = ptr_; in release()
127 C* ptr_;
131 friend scoped_ptr<C> make_scoped_ptr<C>(C *p);
145 template <class C>
146 inline void swap(scoped_ptr<C>& p1, scoped_ptr<C>& p2) { in swap()
150 template <class C>
151 inline bool operator==(const C* p1, const scoped_ptr<C>& p2) {
155 template <class C>
156 inline bool operator==(const C* p1, const scoped_ptr<const C>& p2) {
160 template <class C>
161 inline bool operator!=(const C* p1, const scoped_ptr<C>& p2) {
165 template <class C>
166 inline bool operator!=(const C* p1, const scoped_ptr<const C>& p2) {
170 template <class C>
171 scoped_ptr<C> make_scoped_ptr(C *p) { in make_scoped_ptr()
181 return scoped_ptr<C>(p); in make_scoped_ptr()
193 template <class C>
197 typedef C element_type;
202 explicit scoped_array(C* p = NULL) : array_(p) { } in array_()
207 enum { type_must_be_complete = sizeof(C) }; in ~scoped_array()
214 void reset(C* p = NULL) {
216 enum { type_must_be_complete = sizeof(C) };
224 C& operator[](std::ptrdiff_t i) const {
232 C* get() const { in get()
239 bool operator==(const C* p) const { return array_ == p; }
240 bool operator!=(const C* p) const { return array_ != p; }
244 C* tmp = array_; in swap()
254 C* release() { in release()
255 C* retVal = array_; in release()
261 C* array_;
273 template <class C>
274 inline void swap(scoped_array<C>& p1, scoped_array<C>& p2) { in swap()
278 template <class C>
279 inline bool operator==(const C* p1, const scoped_array<C>& p2) {
283 template <class C>
284 inline bool operator==(const C* p1, const scoped_array<const C>& p2) {
288 template <class C>
289 inline bool operator!=(const C* p1, const scoped_array<C>& p2) {
293 template <class C>
294 inline bool operator!=(const C* p1, const scoped_array<const C>& p2) {