This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: Valarray
Gabriel Dos Reis wrote:
>
> I thought you were suggesting to implement the valarray library in
> a "more OO fashion". It appears that I misunderstood your question.
No, nothing like that! :-)
Austern says (15.7):
"The member function adaptors are a family of small classes that allow you to
call member functions a function objects. Each takes an argument of type X* or
X&, and calls one of X's member functions through that argument. If the member
function is virtual, this will be a polymorphic function call. The member
function adaptors are therefore a link between object-oriented programming and
generic programming."
I was just looking at a way of deriving off unary_function, with specific
template parameters, and a virtual function call operator, as a way of merging
OO and generic programming. So that I can do serialization and other goodies (in
my derived classes).
> No, I didn't consider serialization (or such). My main concern is to
> get the library right and fix its interface.
Thanks for the work! I'm beginning to like valarray. :-)
--
Marc Lepage
Software Developer
Molecular Mining Corporation
http://www.molecularmining.com/