[offtopic] STL complex design question
Thomas Kunert
kunert@physik.tu-dresden.de
Fri Aug 21 04:12:00 GMT 1998
Noel Yap wrote:
> Have an array of pointers to complex instead of an array of complex
Never do that!
Now there is no implicit initialization. You must initialize each member
of the array explicitly, even with a function call.
Beside that, you get a huge perfomance loss and ugly syntax.
> automatic constructor calls are one of the things I hate most about > C++.
What's bad with that? That's the soul of C++! And you can avoid it if
you don't like it: Just use raw memory. Using c-style arrays is
deprecated for user code anyway. You should invent your own class
array_of_complex that doesn't initialize the memory.
Regards,
Thomas Kunert
More information about the Gcc
mailing list