This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C99 _Complex and C++ complex<> interoperability.


Benjamin Kosnik <bkoz@redhat.com> writes:

| > | I have noticed that it is possible (since 4.0) to construct and assign
| > | from a C99 complex number to a C++ complex number.
| > | | I think this is very cool.  This goes part way towards
| > reconciling C99
| > | and C++ as far as complex numbers are concerned.
| > | | I don't see this in the C++ standard or under g++ extensions in
| > the
| > | manual.
| > It is not in the ISO C++ standard.  It is purely a libstdc++
| > implementation detail.  However, I've taken deliberately chosen to
| > make  ISO C++ std::complex<> and ISO C _Complex interoperate where
| > possible.  It is therefore a GCC extension that I'm not willing to
| > formally document at this moment because there are other issues that
| > are resolved yet and that might change in the future.
| 
| FWIW, I too think this is cool and where the standard should be headed.
| 
| If somebody was to write up the current libstdc++ behavior as
| standardese or a paper, (likely that would also mean attending a
| meeting or two and trying to get it discussed), and if Red Hat is a
| voting member of ISO C++, I would vote yes.

:-) [ seriously, I thought RH is a voting member, no? ]

I would vote "over my dead body".

Essentially, we would have two complex number data types in the
language, with one being in library and one being in the core
language.  There already are widespread FUDs about library data types
being slower that those that are in the core language that I have to
fight every day that I really don't want to fuel it anymore.
Furthermore, we would have incomplatible syntax, with incompatible
conversion rules fore essentially the same notion.  I don't think that
is should be a standard future.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]