I am developing a library which have C interface for compatibility purpose
void interface(double* context, size_t num_elements);
while context
points to a raw memory storing num_elements
double
s. In the remaining part of the code, is there any strategies to construct a std::valarray
which temporarily manage the context
without freeing it after the library call is over?