Boost logo

Boost :

From: Gabriel Dos Reis (Gabriel.Dos-Reis_at_[hidden])
Date: 2002-01-26 16:54:03


Beman Dawes <bdawes_at_[hidden]> writes:

| At 06:00 PM 1/10/2002, David Abrahams wrote:
|
| >> Regarding compatibility with existing C code:
| >> C does not have a complex type.
| >
| >C99 does, AFAIK.
|
| Yes, C99 does. It's in header <complex.h>. Quite different from
| C++. Uses macros "complex" and "imaginary" for example.

Yes. Something missing in C++ (at least, the last time I used C++
std::complex<> in my own programs) is a way to form lvalue expressions
to access std::complex<> components. For example, to set the
imaginary part, one has to write something alon the lines

        z = std::complex<double>(z.real(), imag_part);

-- Gaby


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk