---
name: "sc_auto_vec"
section: "3"
platform: "linux"
package: "libsc-doc"
version: "2.3.1-22"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_auto_vec"
---

# sc\_auto\_vec(3)

The auto\_vec class functions much like auto\_ptr, except it contains references to arrays.

## NAME

sc::auto\_vec\< T \> - The **auto\_vec** class functions much like auto\_ptr, except it contains references to arrays.

## SYNOPSIS

`#include <autovec.h>`

### Public Types

typedef T **element\_type**\

### Public Member Functions

**auto\_vec** (T \*d=0)  throw ()\
 Creates a new **auto\_vec** for a vector, d, of type T.  **auto\_vec** (**auto\_vec** &av)  throw ()\
 Create a **auto\_vec**, transferring the storage from another.  **~auto\_vec** ()  throw ()\
 This will delete the vector.  **auto\_vec** & **operator=** (**auto\_vec** &av)  throw ()\
 This member transfers the data from av to this.  T \* **get** () const  throw ()\
 Returns the pointer.  T & **operator\[\]** (size\_t i)  throw ()\
 Returns the i'th element.  T \* **release** ()  throw ()\
 Release ownership.  void **reset** (T \*d=0)  throw ()\
 Assign to a new value.

## Detailed Description

### template\<class T\>

class sc::auto\_vec\< T \>"The **auto\_vec** class functions much like auto\_ptr, except it contains references to arrays.

The delete\[\] operator will be used to deallocate data.

## Constructor & Destructor Documentation

### template\<class T \> sc::auto\_vec\< T \>::auto\_vec (T \* d = `0`)` [inline]`, ` [explicit]`

Creates a new **auto\_vec** for a vector, d, of type T. The d argument must be created with the vector new operator: new T\[...\].

## Author

Generated automatically by Doxygen for MPQC from the source code.
