This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: PATCH to valarray
Benjamin Kosnik <bkoz@redhat.com> writes:
| > * include/bits/valarray_array.h (__valarray_default_construct):
| > Replace use __is_fundamental with __is_pod.
| > (__valarray_fill_construct): Likewise.
| > (__valarray_copy_construct): Likewise.
| > (__valarray_destroy_elements): Likewise.
| > (__valarray_copy): Likewise.
|
| You need to start checking in test cases for this stuff...
Agreed.
The difference between this and the previous version is essentially
performance wise (not semantics). For example, the follow up patch
is to call calloc() -- instead of malloc + memset -- for PODs and
malloc() for non-POD. I just don't know how to test those reliably
(it is close to the question I asked recently about aligned copy and
memcpy.)
-- Gaby