• Home
  • Raw
  • Download

Lines Matching refs:C

82 template <class C>
87 typedef C element_type;
92 explicit scoped_ptr(C* p = NULL) : ptr_(p) { } in ptr_()
97 enum { type_must_be_complete = sizeof(C) }; in ~scoped_ptr()
104 void reset(C* p = NULL) {
106 enum { type_must_be_complete = sizeof(C) };
114 C& operator*() const {
118 C* operator->() const {
122 C* get() const { return ptr_; } in get()
127 bool operator==(C* p) const { return ptr_ == p; }
128 bool operator!=(C* p) const { return ptr_ != p; }
132 C* tmp = ptr_; in swap()
142 C* release() { in release()
143 C* retVal = ptr_; in release()
149 C* ptr_;
163 template <class C>
164 void swap(scoped_ptr<C>& p1, scoped_ptr<C>& p2) { in swap()
168 template <class C>
169 bool operator==(C* p1, const scoped_ptr<C>& p2) {
173 template <class C>
174 bool operator!=(C* p1, const scoped_ptr<C>& p2) {
187 template <class C>
192 typedef C element_type;
197 explicit scoped_array(C* p = NULL) : array_(p) { } in array_()
202 enum { type_must_be_complete = sizeof(C) }; in ~scoped_array()
209 void reset(C* p = NULL) {
211 enum { type_must_be_complete = sizeof(C) };
219 C& operator[](ptrdiff_t i) const {
227 C* get() const { in get()
234 bool operator==(C* p) const { return array_ == p; }
235 bool operator!=(C* p) const { return array_ != p; }
239 C* tmp = array_; in swap()
249 C* release() { in release()
250 C* retVal = array_; in release()
256 C* array_;
268 template <class C>
269 void swap(scoped_array<C>& p1, scoped_array<C>& p2) { in swap()
273 template <class C>
274 bool operator==(C* p1, const scoped_array<C>& p2) {
278 template <class C>
279 bool operator!=(C* p1, const scoped_array<C>& p2) {
295 template<class C, class FreeProc = ScopedPtrMallocFree>
300 typedef C element_type;
307 explicit scoped_ptr_malloc(C* p = NULL): ptr_(p) {} in ptr_()
317 void reset(C* p = NULL) {
328 C& operator*() const {
333 C* operator->() const {
338 C* get() const { in get()
347 bool operator==(C* p) const {
351 bool operator!=(C* p) const {
357 C* tmp = b.ptr_; in swap()
367 C* release() { in release()
368 C* tmp = ptr_; in release()
374 C* ptr_;
387 template<class C, class FP> inline
388 void swap(scoped_ptr_malloc<C, FP>& a, scoped_ptr_malloc<C, FP>& b) { in swap() argument
392 template<class C, class FP> inline
393 bool operator==(C* p, const scoped_ptr_malloc<C, FP>& b) {
397 template<class C, class FP> inline
398 bool operator!=(C* p, const scoped_ptr_malloc<C, FP>& b) {