エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
ここにツイート内容が記載されます https://b.hatena.ne.jp/URLはspanで囲んでください
Twitterで共有ONにすると、次回以降このダイアログを飛ばしてTwitterに遷移します
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
# include <iostream> # include <vector> using namespace std; struct Obj { Obj() { cout << "constr... # include <iostream> # include <vector> using namespace std; struct Obj { Obj() { cout << "constructor" << endl; } Obj(const Obj& o) { cout << "copy constructor" << endl; } /* ムーブコンストラクタなしの場合 Obj(Obj&& o) { cout << "move constructor" << endl; } */ }; int main() { std::vector<Obj> v; cout << "1\n"; v.push_back(Obj()); cout << "2\n"; v.push_back(Obj()); cout << "3\n"; v.push_back(Obj()); return 0; }