Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
構造体のパラメーター リストで定義されている既定値を指定できないのはなぜですか? つまり、なぜこれが機能するのか
struct C {int i;}; C cc = {0}; foo(C c=cc) {}
だがしかし
foo(C c={0}) {}
同じことが配列にも当てはまることに気付きました。
わかりました、これは古い GCC のコンパイラの問題のようです。