カンマ演算子って使ってる?
Hoge & operator = (const Hoge & h) {
if(this == &h) return *this;
Hoge(h).swap(*this);
return *this;
}
↓
Hoge & operator = (const Hoge & h) { return this = &h ? *this : Hoge(h).swap(*this), *this; }
みたいな感じで行数減らせるようになって俺としては気持がいいんだけど…
あと意味的に連続してるような
a = aa;
b = bb;
c = cc;
みたいなばあいは
a = aa, b = bb, c = cc;
にした方が自然言語っぽくて見やすくない?