I
Ioannis Vranos
In TC++PL3 on page 676, it is mentioned at the bottom:
"I introduced a new Vector (rather than using a valarray) because I
needed to define assignment (and assignment must be a member function;
11.2.2). However, valarray is a strong candidate for the representation
of that Vector".
OK, the assignment must be defined in a way that performs the evaluation
of U=M*V+W, so we can't use a valarray directly since it has its
assignment operations already defined.
However (and having checked 11.2.2 where I did not find something
relevant), "must assignment be a member function" always?
"I introduced a new Vector (rather than using a valarray) because I
needed to define assignment (and assignment must be a member function;
11.2.2). However, valarray is a strong candidate for the representation
of that Vector".
OK, the assignment must be defined in a way that performs the evaluation
of U=M*V+W, so we can't use a valarray directly since it has its
assignment operations already defined.
However (and having checked 11.2.2 where I did not find something
relevant), "must assignment be a member function" always?