
Hi Joerg, thank you. I think I am starting to learn (steep slope ;-).
I'd tend to use
template<class E> void foo (vector_expression<E> &arg);
or
template<class E> void foo (const vector_expression<E> &arg);
Can I see this as specifying the base classes of my argument types?
Should I use iterators for whattype?
Unsure about that.
I tried to do it, but there seem to be some problems with VC60 (distance_type instead of difference_type, iterator_traits don't work because of unsopported partial specialization, ...)
(Which container should I use in this case?)
No need to copy yet.
Ok, these arguments are expressions. But now I ran into the following: ============================================================= template<class E> struct func { func(const matrix_expression<E>& arg) : e(arg) {} typename E::value_type operator() () { return e[e.size1()-1]; }; private: //const matrix_expression<E>& e; // error-> size1 not a member of matrix_expression const matrix_reference<E> e; // doesn't work either... }; int main(int argc, char* argv[]) { matrix<double> v (3,3); func<matrix<double> > f(v); f(); return 0; } ============================================================= I think I do not yet understand of how to use the matrix_reference, do I? Using matrix_const_reference instead gives me an error that I have no glue what is going on: error C2143: syntax error : missing ';' before '<' regards, roland