Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp2a/paren-init18.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | 1830386684a0 |
children |
line wrap: on
line source
// PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. // { dg-do compile { target c++2a } } struct A { int a, b, c; }; struct S { A a; }; constexpr S s{ A(1, 2, 3) }; static_assert (s.a.a == 1 && s.a.b == 2 && s.a.c == 3); constexpr S s2 = { A(1, 2, 3) }; static_assert (s2.a.a == 1 && s2.a.b == 2 && s2.a.c == 3);