47 #ifndef _util_misc_autovec_h
48 #define _util_misc_autovec_h
51 #include <util/misc/exception.h>
62 typedef T element_type;
67 explicit auto_vec(T*d = 0) MPQC__NOEXCEPT: d_(d) {}
82 T*
get() const MPQC__NOEXCEPT {
return d_; }
88 const T &
operator[](
size_t i)
const MPQC__NOEXCEPT {
return d_[i]; }
98 void reset(T*d=0) MPQC__NOEXCEPT {
109 #endif // _util_misc_autovec_h
T * release() MPQC__NOEXCEPT
Release ownership.
Definition: autovec.h:91
T * get() const MPQC__NOEXCEPT
Returns the pointer.
Definition: autovec.h:82
void reset(T *d=0) MPQC__NOEXCEPT
Assign to a new value.
Definition: autovec.h:98
The auto_vec class functions much like auto_ptr, except it contains references to arrays.
Definition: autovec.h:59
auto_vec & operator=(auto_vec &av) MPQC__NOEXCEPT
This member transfers the data from av to this.
Definition: autovec.h:76
const T & operator[](size_t i) const MPQC__NOEXCEPT
Returns the i'th element.
Definition: autovec.h:88
auto_vec(auto_vec &av) MPQC__NOEXCEPT
Create a auto_vec, transferring the storage from another.
Definition: autovec.h:70
~auto_vec() MPQC__NOEXCEPT
This will delete the vector.
Definition: autovec.h:73
auto_vec(T *d=0) MPQC__NOEXCEPT
Creates a new auto_vec for a vector, d, of type T.
Definition: autovec.h:67
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
T & operator[](size_t i) MPQC__NOEXCEPT
Returns the i'th element.
Definition: autovec.h:85
Generated at Sun Jan 26 2020 23:24:01 for MPQC
3.0.0-alpha using the documentation package Doxygen
1.8.16.