Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4637: An extra scoped_array(n) constructor, please!
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-11-03 14:22:01
#4637: An extra scoped_array(n) constructor, please!
-------------------------------+--------------------------------------------
Reporter: niels_dekker | Owner: pdimov
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: smart_ptr
Version: Boost 1.44.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+--------------------------------------------
Comment (by niels_dekker):
Hoi Olaf,
Thanks for your feedback. I prefer to have the elements value-initialized
by such a scoped_array(n) constructor. That's also consistent with the
interface of std::vector:
{{{
// All 'n' elements value-initialized:
boost::scoped_array<my_type> a(n);
std::vector<my_type> v(n);
}}}
People who really need to have uninitialized elements can still use the
old (verbose) syntax, of course...
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4637#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC