-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Just that this is documented somewhere:
multi2d<Double> matrix = someFunction();
multi1d<Double> vec_view = matrix[0];
multi1d<Double> vec_copy; vec_copy = matrix[0];modifying vec_view will silently modify matrix, because compilers
are allowed to optimize out the multi1d copy c'tor call.
This also applies to other scenarios where a subslice of a multiXd is accessed.
The third statement provides an actual copy and does not modify matrix.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels