Dear vxl maintainers,

I've run afoul of a difference in the implementation of std::complex, which appears to propagate to vcl_complex.

In GNU c++, the STL complex defines member functions real (and similarly imag) such:

      ///  Return real part of complex number.
      _Tp& real();

      ///  Return real part of complex number.
      const _Tp& real() const;

In MSVC8, the STL complex defines member functions real (and similarly imag) such:

        _Ty real(const _Ty& _Right)
                {       // set real component
                return (this->_Val[_RE] = _Right);
                }

        _Ty real() const
                {       // return real component
                return (this->_Val[_RE]);
                }

In the GNU implementation, the real part is assigned thus:

        x.real() = c;

In the MSVC8 implementation, the real part is assigned thus:

        x.real( c );

On both platforms, vcl_complex appears to be defined as std::complex, so this implementation difference propagates into vcl_complex.

Am I missing something here, or is vcl_complex failing to enforce a standard, cross-platform implementation?


Many thanks,
Brandon


J. Brandon Laflen
GE Global Research Center
Visualization & Computer Vision Lab
1 Research Circle, KW-C317
Niskayuna, NY 12309
(518) 387-4677 (voice)