$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2003-02-13 10:58:59
On Thursday 13 February 2003 14:48, "speedsnaii wrote:
> A question on use of the matrix and vector classes:
> In other words: is it expensive to construct the temporary in case
> one? As I understand, the class would need an underlying 'copy on
> write' to be cheap, similar as strings do.
>
matrices and vectors (the containers themselves) have deep copy semantics.
Views (like matrix_range, matrix_stride, matrix_row etc) have shallow copy semantics.
So if you want to pass a matrix by value (syntacticly) but want shallow copy semantics,
just define a matrix_range on your matrix that covers the whole matrix and use this
in the argument list.
toon