3 ms·
You really don't think that the semantics of foo[5] = {0} vs int foo[5] = {0} being completely different in C++11 is weird?
by jordigh 12y ago
You really don't think that the semantics of foo[5] = {0} vs int foo[5] = {0} being completely different in C++11 is weird?
- banachtarski 12y agoThey read differently so why shouldn't they be different? One has a type specification so reads like a declaration. The other doesn't. This wasn't weird before C++11 too. The only difference is that one didn't compile before (prior to the introduction of initializer lists).