Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
| >>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
|
| Lars> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: |
| Lars> Well, I do not understand templates much, but in definitions
| Lars> taking a | block as argument like | bool operator==(block const
| Lars> & b) const { | shouldn't we have | bool
| Lars> operator==(block<foo,bar> const & b) const {
|
| Lars> No, that should not be needed. Does the warning go away if you
| Lars> do that?
|
| No, but I do not know what I am supposed to put there...
block<T, s> & operator=(block<T, s> const & b) {
for (size_t i = 0; i < size(); ++i) {
arr[i] == b[i];
}
return *this;
}
perhaps
template <class S, size_t l>
block<T, s> & operator=(block<S, l> const & b) {
Assert(b.size() == size());
for (size_t i = 0; i < size(); ++i) {
arr[i] == b[i];
}
return *this;
}
|
| Lars> One other thing is that operator== should be moved out of the
| Lars> class.
|
| I meant to show the operator=, in fact.
ok.
Lgb