[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Toon-members] TooN bug? (affects libCVD)
From: |
Ethan Eade |
Subject: |
Re: [Toon-members] TooN bug? (affects libCVD) |
Date: |
Thu, 24 Jul 2008 18:18:27 +0100 |
User-agent: |
Thunderbird 2.0.0.12 (X11/20080226) |
This is because the return value of slice() is not a reference, and GCC
isn't allowed to convert it to a non-const reference. To get around
this problem, I long ago added cast operators to DynamicMatrix, which
just turn an instance into a non-const reference. GCC is not
technically supposed to use these, but it did anyway. Now it is finally
refusing to do so. So the options are:
1. Add operator methods directly to DynamicMatrix.
2. Add a ref() method to DynamicMatrix which returns a reference to
itself, and then do:
m.slice(0,0,3,3).ref() += ....
[This is what people do, using the flush() method, in order to use
temporary ostreams: (ostringstream().flush() << stuff_to_output).str() ]
3. Define special operator functions that take wrapper objects to the
things that slice() returns, and handles them appropriately
The first one will look nicer for the user, but will duplicate the
operator code in TooN, and make maintenance difficult. The second will
be annoying and non-uniform for the user, but will work. I haven't
worked out the details of the third option. How annoying.
- Ethan
Edward Rosten wrote:
On Thu, 24 Jul 2008, Edward Rosten wrote:
The return type of .slice() is RefSkipMatrixRM, which is a
DynamicMatrix<RefSkipMAccessor<RowMajor> > . I can't see how line 842
isn't enough of a match. Any ideas?
That shold be line 835
-Ed
_______________________________________________
Toon-members mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/toon-members