I used C before (embedded stuff), and I can initialize my arrays like that:
int widths[] = { [0 ... 9] = 1, [10 ... 99] = 2, [100] = 3 };
i
After years, I tested it just by chance, and I can confirm that it works in g++ -std=c++11, g++ version is 4.8.2.
g++ -std=c++11