This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [offtopic] STL complex design question
- To: nbecker at fred dot net
- Subject: Re: [offtopic] STL complex design question
- From: Thomas Kunert <kunert at physik dot tu-dresden dot de>
- Date: Thu, 20 Aug 1998 09:44:45 +0200
- CC: egcs at cygnus dot com
- Organization: TU Dresden
- References: <E0z97Tr-00018I-00@hns.com>
nbecker@fred.net wrote:
>
> I do a lot of numerical computation. I like to use the complex<>
> class. The STL specifies a default constructor, which will set a
> complex element to zero. This means that anytime a large complex
> array is needed (for example, enters local scope), the whole thing
> will always be zeroed.
>
> In my opinion, this is a bad idea.
Opinions don't matter anymore. It's standard.
Take a look at the allocator template class. This can provide
uninitialized memory.
--
Thomas Kunert