summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures/cxx_aggregate_default_initializers.cpp
blob: 63a3713cf947f350b10d9a1e10485b65c2d4545e (plain)
1
2
3
4
5
6
7
8
9

struct X { int i, j, k = 42; };

int someFunc()
{
  X a[] = { 1, 2, 3, 4, 5, 6 };
  X b[2] = { { 1, 2, 3 }, { 4, 5, 6 } };
  return a[0].k == b[0].k && a[1].k == b[1].k ? 0 : 1;
}