1
可能性の重複を初期化:
Do the parentheses after the type name make a difference with new?スマートポインタ
いただきまし以下initialisationsの違いは?このチュートリアルでは、ケース#1の場合と同じですが、#2の方法を使用すると違いはありますか?
struct X
{
X() {}
int x;
};
int main()
{
std::auto_ptr<X> p1(new X); // #1
std::auto_ptr<X> p2(new X()); // #2
}
参照:http://stackoverflow.com/questions/620137/do-the-parentheses-after-the-type-name-make-a-difference-with-new – JRL