On 20/06/2008, Hongzheng Wang <[EMAIL PROTECTED]> wrote:
>  On Sat, Jun 21, 2008 at 1:53 AM, Jordi Gutiérrez Hermoso
>  <[EMAIL PROTECTED]> wrote:
>
>  > Thank you. One comment: you used C complexes, which don't work in C++.
>  > Funny, did you know that C and C++ have mutually incompatible
>  > implementations of complex numbers, at least with gcc?
>
>
> Could you please give us more detailed info about his issue?  Do you
>  mean they are using difference memory layout?  Or just syntax
>  difference (C's complex is a macro for built-in keyword _Complex,
>  while C++'s complex is a template class). I think it would be of
>  benefit to us even beyond the scope of gsl.  Thank you in advance.

Syntax seems to be it. They have widely different syntax. There may
also be implementation issues. The macro, unless C's complexes are not
as standard as I think they are, is "complex", not "_Complex". The
biggest problem, and maybe there is a way to override it, is that
#include<complex.h> gets interpreted different ways depending if gcc
is compiling the code as a C or a C++ program. As a C program, it
includes the right declaration, and as a C++ program, it interprets it
as an attempt to write #include <complex> and warns about deprecated
headers.

HTH,
- Jordi G. H.


_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to