blob: b8d82470d586a781b429f8fb7d0a6cbcc1060358 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/* -*- C++ -*- */
// $Id$
template <class X>
class auto_builtin_ptr
// = TITLE
// Implements an simple-minded auto_ptr abstraction for builtin types.
{
public:
// = Initialization and termination methods
auto_builtin_ptr (X *p = 0): p_ (p) {}
~auto_builtin_ptr (void) { delete [] this->p_; }
// = Accessor methods.
operator X * (void) const { return this->p_; }
private:
X *p_;
};
|