---
name: "ACE_Auto_Basic_Ptr"
section: "3"
platform: "linux"
package: "libace-doc"
version: "5.0.7-4"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/ACE_Auto_Basic_Ptr"
---

# ACE\_Auto\_Basic\_Ptr(3)

Implements the draft C++ standard auto\_ptr abstraction. This class allows one to work on non-object (basic) types

## NAME

ACE\_Auto\_Basic\_Ptr -  Implements the draft C++ standard auto\_ptr abstraction. This class allows one to work on non-object (basic) types

## SYNOPSIS

```
#include <ace/Auto_Ptr.h>
template<class X>
class ACE_Auto_Basic_Ptr
{
  public:
    ACE_EXPLICIT ACE_Auto_Basic_Ptr (X *p = 0);
    ACE_Auto_Basic_Ptr (ACE_Auto_Basic_Ptr<X> &ap);
    ACE_Auto_Basic_Ptr<X> &operator= (ACE_Auto_Basic_Ptr<X> &rhs);
    ~ACE_Auto_Basic_Ptr (void);
    X &operator *() const;
    X *get (void) const;
    X *release (void);
    void reset (X *p = 0);
    void dump (void) const;
    ACE_ALLOC_HOOK_DECLARE;
  protected:
    X *p_;
};
```

## Initialization and termination methods

```
ACE_EXPLICIT ACE_Auto_Basic_Ptr (X *p = 0);
```

```
ACE_Auto_Basic_Ptr (ACE_Auto_Basic_Ptr<X> &ap);
```

```
ACE_Auto_Basic_Ptr<X> &operator= (ACE_Auto_Basic_Ptr<X> &rhs);
```

```
~ACE_Auto_Basic_Ptr (void);
```

## Accessor methods.

```
X &operator *() const;
```

```
X *get (void) const;
```

```
X *release (void);
```

```
void reset (X *p = 0);
```

```
void dump (void) const;
```

Dump the state of an object.

```
ACE_ALLOC_HOOK_DECLARE;
```

Declare the dynamic allocation hooks.

## AUTHOR

Doug Schmidt and Irfan Pyarali, based on code from Jack Reeves (jack@fx.com) and Dr. Harald M. Mueller (mueller@garwein.hai.siemens.co.at)

## LIBRARY

ace
