forked from boostorg/smart_ptr
Minor documentation corrections
This commit is contained in:
+7
-7
@@ -13,9 +13,9 @@
|
||||
<a href="#example">Examples</a><br>
|
||||
<a href="#history">History</a></p>
|
||||
<h2><a name="Introduction">Introduction</a></h2>
|
||||
<p>The header file <boost/make_unique.hpp> provides a family of
|
||||
overloaded function template <code>make_unique</code> for convenient
|
||||
creation of <code>unique_ptr</code> objects.</p>
|
||||
<p>The header file <boost/make_unique.hpp> provides overloaded
|
||||
function template <code>make_unique</code> for convenient creation of
|
||||
<code>unique_ptr</code> objects.</p>
|
||||
<h2><a name="Synopsis">Synopsis</a></h2>
|
||||
<pre>namespace boost {
|
||||
template<typename U> // U is not array
|
||||
@@ -69,20 +69,20 @@ unique_ptr<U> make_unique_noinit();</pre>
|
||||
<pre>template<typename U> // U is T[]
|
||||
unique_ptr<U> make_unique(size_t size);</pre>
|
||||
<blockquote>
|
||||
<p><b>Requires:</b> The expression <code>new U()</code> shall be
|
||||
<p><b>Requires:</b> The expression <code>new T[size]()</code> shall be
|
||||
well-formed.</p>
|
||||
<p><b>Effects:</b> Constructs an array of objects of type
|
||||
<code>U</code> and size <code>size</code> via the expression
|
||||
<code>new U[size]()</code>.</p>
|
||||
<code>new T[size]()</code>.</p>
|
||||
</blockquote>
|
||||
<pre>template<typename U> // U is T[]
|
||||
unique_ptr<U> make_unique_noinit(size_t size);</pre>
|
||||
<blockquote>
|
||||
<p><b>Requires:</b> The expression <code>new U</code> shall be
|
||||
<p><b>Requires:</b> The expression <code>new T[size]</code> shall be
|
||||
well-formed.</p>
|
||||
<p><b>Effects:</b> Constructs an array of objects of type
|
||||
<code>U</code> and size <code>size</code> via the expression
|
||||
<code>new U[size]</code>.</p>
|
||||
<code>new T[size]</code>.</p>
|
||||
</blockquote>
|
||||
<h2><a name="example">Examples</a></h2>
|
||||
<p>For objects with value-initialization.</p>
|
||||
|
||||
Reference in New Issue
Block a user