Mercurial > hg > octave-lyh
changeset 3574:787bb9d8f60e
[project @ 2000-02-04 10:13:23 by jwe]
author | jwe |
---|---|
date | Fri, 04 Feb 2000 10:13:26 +0000 |
parents | 6ae6f1180e62 |
children | 7576a76f6d7b |
files | liboctave/ChangeLog liboctave/MArray-defs.h liboctave/MArray.cc liboctave/MArray2.cc src/ChangeLog src/Makefile.in |
diffstat | 6 files changed, 25 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,7 +1,10 @@ 2000-02-04 John W. Eaton <jwe@bevo.che.wisc.edu> - * dColVector.h, dRowVector.h, CColVector.h, CRowVector.h: - Use MARRAY_FORWARD_DEFS here. + * MArray-defs.h: Many new macros to make declaration and + definition of operators more consistent. + + * MArray.h, MArray2.h, dColVector.h, dRowVector.h, CColVector.h, + CRowVector.h, dMatrix.h, CMatrix.h: Use them. 2000-02-03 John W. Eaton <jwe@bevo.che.wisc.edu>
--- a/liboctave/MArray-defs.h +++ b/liboctave/MArray-defs.h @@ -71,7 +71,7 @@ // Instantiate the OP= operators. #define MARRAY_OP_ASSIGN_DEFS(A_T, E_T) \ - MARRAY_OP_ASSIGN_DECLS (A_T, E_T, template, , T) \ + MARRAY_OP_ASSIGN_DECLS (A_T, E_T, template, , E_T) \ MARRAY_OP_ASSIGN_DECLS (A_T, E_T, template, , A_T<E_T>) // A function that can be used to forward OP= operations from derived
--- a/liboctave/MArray.cc +++ b/liboctave/MArray.cc @@ -160,6 +160,13 @@ template <class T> MArray<T> +operator + (const MArray<T>& a) +{ + return a; +} + +template <class T> +MArray<T> operator - (const MArray<T>& a) { int l = a.length (); @@ -170,13 +177,6 @@ return result; } -template <class T> -MArray<T> -operator + (const MArray<T>& a) -{ - return a; -} - /* ;;; Local Variables: *** ;;; mode: C++ ***
--- a/liboctave/MArray2.cc +++ b/liboctave/MArray2.cc @@ -173,6 +173,13 @@ template <class T> MArray2<T> +operator + (const MArray2<T>& a) +{ + return a; +} + +template <class T> +MArray2<T> operator - (const MArray2<T>& a) { int l = a.length ();