Clarify the MakeUnique documentation (comment only change, no bug)

DONTBUILD, CLOSED TREE

--HG--
extra : amend_source : 92e8482f1dfb6f9f47acdec1e570d62887257122
This commit is contained in:
Ehsan Akhgari 2014-12-19 17:51:10 -05:00
parent f738069208
commit 76e3eddf4f

View File

@ -634,9 +634,9 @@ struct UniqueSelector<T[N]>
* possible. (This pays off best if a class is only ever created through a
* factory method on the class, using a private constructor.)
*
* Second, initializing a UniquePtr using a |new| expression requires renaming
* the new'd type, whereas MakeUnique in concert with the |auto| keyword names
* it only once:
* Second, initializing a UniquePtr using a |new| expression requires repeating
* the name of the new'd type, whereas MakeUnique in concert with the |auto|
* keyword names it only once:
*
* UniquePtr<char> ptr1(new char()); // repetitive
* auto ptr2 = MakeUnique<char>(); // shorter