20/01/18 21:28:09 Upzp+V6z.net
つか
do {
処理A;
if (cond) { break; }
処理B;
std::unique_ptr p(new Foo());
処理C; // pを使用
} while (0);
みたいな腐り切った腐敗臭しかしないコードを書くぐらいなら
std::unique_ptr p;
{
処理A;
if (cond) { goto last; }
処理B;
p = std::unique_ptr(new Foo());
処理C; // pを使用
}
last:
;
と書くわ
Perl風に