gslcpp
Modern-C++ Wrapper for GSL
|
Generic v_stor is interface to storage with two key properties: (1) that size of storage is known statically, at compile-time, and (2) that it is owned by instance of v_stor. More...
#include <v-stor.hpp>
Public Member Functions | |
v_stor (size_t n=S) | |
Initialize GSL's view of static storage, but do not initialize elements. More... | |
auto * | v () |
Pointer to GSL's interface to vector. More... | |
const auto * | v () const |
Pointer to GSL's interface to vector. More... | |
Private Member Functions | |
v_stor (v_stor const &)=delete | |
Disable copy-construction. | |
v_stor & | operator= (v_stor const &)=delete |
Disable copy-assignment. | |
Private Attributes | |
T | d_ [S] |
Storage for data. | |
w_vector_view< T > | cview_ |
GSL's view of data. | |
Generic v_stor is interface to storage with two key properties: (1) that size of storage is known statically, at compile-time, and (2) that it is owned by instance of v_stor.
Specialization gsl::v_stor<T,0> is for storage-size determined at run-time.
T | Type of each element in vector. |
S | Compile-time size of vector (0 for size specified at run-time). |
Definition at line 22 of file v-stor.hpp.
|
inline |
Initialize GSL's view of static storage, but do not initialize elements.
If number n
of elements intended for vector be not S
, then throw.
n | Number of elements intended for vector. |
Definition at line 35 of file v-stor.hpp.
|
inline |
Pointer to GSL's interface to vector.
Definition at line 41 of file v-stor.hpp.
|
inline |
Pointer to GSL's interface to vector.
Definition at line 45 of file v-stor.hpp.