summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures/cxx_aggregate_default_initializers.cpp
blob: 3d1076f072c80add8ac6d905928c52ec4a0abff5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12

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;
}