The outer product errors that we are seeing with VC6 are due to
overloading issues between
outer_product( vec<T>, vec<T> )
outer_product( fixed<T>, vec<T> )
outer_product( vec<T>, fixed<T> )
outer_product( fixed<T>, fixed<T> )
I'll try to dig deeper tonight.
On Tue 22 Mar 2005, I wrote:
> The outer product errors that we are seeing with VC6 are due to
> overloading issues between
> I'll try to dig deeper tonight.
VC6 has trouble in the partial ordering of template overloads. Given
M<T> op( V<T>, V<T> ); // (1)
template<class T, unsigned n, unsigned m>
MF<T,m,n> op( VF<T,m>, VF<T,n> ); // (2)
op( VF<double,1>, VF<double,2> )
should match (2) better than (1). VC6 cannot do this. I've tried many
approaches to work around this compiler shortcoming to no
avail. (Actually, the issue may be that VC6 does not correctly implement
SFINAE (substitution failure is not an error).)
Note that this is not because of Peter's change. If we take the code
before the change, include both vnl_vector and vnl_vector_fixed and
try outer_product, it will fail with VC6.
[ Someone with VC6 may want to verify this, just to make sure I
didn't make a mistake. ]
I don't think there are any clean solutions to this problem. Service
Pack 6 for VC6 does not seem to fix any real C++ issues.
Anybody have any ideas?
One option is to not provide the overload and explicitly call the
outer_product function outer_product_fixed.
I guess I like monologues. Replying to myself again, on the
outer_product issue: I've implemented and committed a workaround for
VC6. So, vnl should be working again on VC6.
( I still maintain that there is no clean solution, but the
workaround I've implemented is cleaner than what I was thinking when
I made that comment. )
Get latest updates about Open Source Projects, Conferences and News.