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 的编译器问题。