2008/4/29 Kent-Andre Mardal <[EMAIL PROTECTED]>: > > We have the following operator= in GenericVector > > /// Assignment operator > virtual const GenericVector& operator= (const GenericVector& x) = 0; > > and a similar one in eg. EpetraVector: > > /// Assignment operator > const EpetraVector& operator= (const EpetraVector& x); > > Is this operator an implementation of the operator in GenericVector ? > > Kent
No, because the signature is different. The signature of a function includes the name, const status, and specific list of argument types. For regular functions, the return type of an overloaded function can be a pointer to a subclass of A if the superclass function returns A*, and probably similarly with references. However, I think you showed me this did not work with operator=, and that was why you added the second operator signature. So if you have all EpetraVector references, things will work out fine. Otherwise, GenericVector references will be used. -- Martin _______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
