Home | History | Annotate | Download | only in memory

Lines Matching defs:scoped_array

29 // Example usage (scoped_array):
31 // scoped_array<Foo> foo(new Foo[100]);
42 // scoped_array, scoped_ptr_malloc.
155 // scoped_array<C> is like scoped_ptr<C>, except that the caller must allocate
158 // As with scoped_ptr<C>, a scoped_array<C> either points to an object
159 // or is NULL. A scoped_array<C> owns the object that it points to.
160 // scoped_array<T> is thread-compatible, and once you index into it,
163 // Size: sizeof(scoped_array<C>) == sizeof(C*)
165 class scoped_array {
172 // There is no way to create an uninitialized scoped_array.
174 explicit scoped_array(C* p = NULL) : array_(p) { }
178 ~scoped_array() {
209 // These return whether two scoped_array refer to the same object, not just to
215 void swap(scoped_array& p2) {
235 // Forbid comparison of different scoped_array types.
236 template <class C2> bool operator==(scoped_array<C2> const& p2) const;
237 template <class C2> bool operator!=(scoped_array<C2> const& p2) const;
240 scoped_array(const scoped_array&);
241 void operator=(const scoped_array&);
246 void swap(scoped_array<C>& p1, scoped_array<C>& p2) {
251 bool operator==(C* p1, const scoped_array<C>& p2) {
256 bool operator!=(C* p1, const scoped_array<C>& p2) {