Compilation problem MSVC with recent 'sort' implementation
John W. Eaton
jwe at bevo.che.wisc.edu
Sun Feb 3 06:13:43 CST 2008
On 3-Feb-2008, Michael Goffioul wrote:
| I can't compile Array-d.cc anymore with MSVC due to the recent
| changes in sort implementation. The error is that
| Array<T> Array<T>::sort(octave_idx_type, sortmode) gets
| instantiated with T=double before the actual specialization in
| Array-d.cc: line 220. I tracked down this instantiation to
| the appearance of Marray2<double> before the explicit
| specialization. The sequence of inclusion is:
|
| Array-d.cc -> Array.cc -> Range.h -> dMatrix.h -> Marray2<double>.
|
| I looked into Array.cc and couldn't find any reference to
| Range class. So one possible solution to break the chain
| above is not inluding Range.h in Array.cc. However I'm
| not sure about the side effects. Would this be acceptable?
Since the Range class is not used directly in Array.cc, I don't see
why it needs to be included there. I've removed the #include
statement.
Thanks,
jwe
More information about the Octave-maintainers
mailing list