
4 Nov
2011
4 Nov
'11
5:02 p.m.
Great. Does anyone else have comments / concerns about a (size_t) constructor?
I still don't like the idea. If you really want to add this feature, please
Why not?
I'll chime in. None of boost::{shared,scoped}_{ptr,array}<T> allocate T instances within their constructors. That's (part of) what make_shared is intended to do. Avoiding redundant type specifications is auto/BOOST_AUTO's job. Rather than adding potentially ambiguous constructor overloads to well-defined, heavily-used classes, spend the time implementing boost::make_{shared,scoped}_array instead. auto + make_{shared,scoped}_array will accomplish what you want (avoiding specifying the type twice) and the functionality will benefit a much broader audience. - Rhys