Add overloads of allocate_shared_noinit to complement make_shared_noinit

[SVN r81858]
This commit is contained in:
Glen Fernandes
2012-12-11 17:42:47 +00:00
parent 9863467152
commit ecceb710de
6 changed files with 202 additions and 2 deletions
+12 -2
View File
@@ -96,6 +96,12 @@
template<typename T>
shared_ptr&lt;T[N]&gt; <a href="#functions">make_shared_noinit</a>();
template&lt;typename T, typename A&gt;
shared_ptr&lt;T[]&gt; <a href="#functions">allocate_shared_noinit</a>(const A&amp; allocator, size_t size);
template&lt;typename T, typename A&gt;
shared_ptr&lt;T[N]&gt; <a href="#functions">allocate_shared_noinit</a>(const A&amp; allocator);
}</pre>
<h2><a name="functions">Free Functions</a></h2>
<pre>template&lt;typename T, typename... Args&gt;
@@ -197,13 +203,17 @@ template&lt;typename T, typename A&gt;
fixed size array.</p>
</blockquote>
<pre>template&lt;typename T&gt;
shared_ptr&lt;T[]&gt; make_shared_noinit(size_t size);</pre>
shared_ptr&lt;T[]&gt; make_shared_noinit(size_t size);
template&lt;typename T, typename A&gt;
shared_ptr&lt;T[]&gt; make_shared_noinit(const A&amp; allocator, size_t size);</pre>
<blockquote>
<p><b>Description:</b> This overload does not perform value
initialization of elements.</p>
</blockquote>
<pre>template&lt;typename T&gt;
shared_ptr&lt;T[N]&gt; make_shared_noinit();</pre>
shared_ptr&lt;T[N]&gt; make_shared_noinit();
template&lt;typename T, typename A&gt;
shared_ptr&lt;T[N]&gt; make_shared_noinit(const A&amp; allocator);</pre>
<blockquote>
<p><b>Description:</b> This overload of the utility above is used for a
fixed size array.</p>