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.