Paolo Carlini <[EMAIL PROTECTED]> writes: | Paolo Carlini wrote: | | >I think something is going wrong with types characterized by | >""non-trivial"" constructors, e.g., doing memory allocation from the heap. | > | >Gaby can you look into this? | > | > | Gaby, I see __valarray_copy used (instead of __valarray_copy_construct) | by the conversion constructor from slice_array for any type T: i.e., no | placement new, that cannot possibly work a T such as 'struct element' in | the posted snippet. Indeed, lots and lots of errors from valgrind...
Yes, you're right. Anything that puts elements into a valarray being constructed should use _copy_construct. -- Gaby