summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/initlist109.C
blob: 1351a2d57cedbdc286b531c01254ec622df203d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// PR c++/80864
// { dg-do compile { target c++11 } }
// { dg-options "-Wmissing-braces" }

struct S {};
struct A { S s[1]; };

template <typename>
struct R { static constexpr auto h = A{S{}}; }; // { dg-warning "missing braces" }

template <typename>
struct R2 { static constexpr auto h = A{{S{}}}; };

A foo = R<int>::h;
A foo2 = R2<int>::h;