Why has Clang decided to allow designated initializers in C++?
问题 I thought that designated initializers were discontinued in C++ and only worked in C. However, I came across a simple example which compiled and worked fine with clang++. int main() { int a[6] = { [4] = 29, [2] = 15 }; } g++: https://rextester.com/AXIZ79197 (Error) clang++: https://rextester.com/UYVHHP56966 (Works) vc++: https://rextester.com/UCBEU10658 (Error) Both g++ and vc++ failed to compile whereas clang++ worked just fine. It is also worth mentioning that g++ and vc++ gave different