
2 Nov
2012
2 Nov
'12
9:05 a.m.
On Fri, Nov 2, 2012 at 1:37 AM, Peter Dimov <lists@pdimov.com> wrote:
Does Glen's make_shared_array have variants for both initialized and uninitialized allocations (for builtin types)?
This is a thorny issue. Some people want initialized allocations, some don't. I'm personally in the initialized camp, so I think that make_shared_array should initialize. But there is a legitimate need to allocate big uninitialized arrays. We probably ought to provide both. So how about...
How thorny can it be? Providing two variants seems like an easy and good solution. What's the use case for default/zero initialized arrays of builtin types though? In most of not all cases I'd expect the user to fill the array with other data. -- Olaf