Mercurial > hg > octave-lyh
diff liboctave/MSparse.h @ 9812:f80c566bc751
improve unary mapper system
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 12 Nov 2009 15:47:58 +0100 |
parents | eb63fbe60fab |
children | 4c0cdbe0acca |
line wrap: on
line diff
--- a/liboctave/MSparse.h +++ b/liboctave/MSparse.h @@ -117,11 +117,16 @@ return Sparse<T>::diag (k); } - template <class U, class F> - MSparse<U> map (F fcn) const - { - return Sparse<T>::template map<U> (fcn); - } + // FIXME: should go away. + template <class U> + MSparse<U> + map (U (&fcn) (T)) const + { return Sparse<T>::template map<U> (fcn); } + + template <class U> + MSparse<U> + map (U (&fcn) (const T&)) const + { return Sparse<T>::template map<U> (fcn); } // Currently, the OPS functions don't need to be friends, but that // may change.