You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// expected-warning@+1 {{field in 'Embed' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_EMBED2 {{'embed2' declared here}}
1566
1583
::new(static_cast<void*>(&f1)) decltype(f1);
1567
-
// expected-warning@+1 {{field in 'Embed' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_EMBED2 {{'embed2' declared here}}
1568
-
::new(static_cast<void*>(&f1)) decltype(f1)();
1584
+
// expected-warning@#FIELD_EMBED2_CONSTRUCT_AT {{field in 'Embed' requires explicit initialization but is not explicitly initialized}} expected-note@+1 {{in instantiation of function template specialization 'std::construct_at<Embed>' requested here}} expected-note@#FIELD_EMBED2 {{'embed2' declared here}}
1585
+
std::construct_at(&f1);
1569
1586
#if __cplusplus >= 202002L
1570
-
// expected-warning@+1 {{field 'embed2' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_EMBED2 {{'embed2' declared here}}
1571
-
::new(static_cast<void*>(&f1)) decltype(f1)(1);
1587
+
// expected-warning@#FIELD_EMBED2_CONSTRUCT_AT {{field 'embed2' requires explicit initialization but is not explicitly initialized}} expected-note@+1 {{in instantiation of function template specialization 'std::construct_at<Embed, int>' requested here}} expected-note@#FIELD_EMBED2 {{'embed2' declared here}}
1588
+
std::construct_at(&f1, 1);
1572
1589
#endif
1573
1590
// expected-warning@+1 {{field 'embed2' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_EMBED2 {{'embed2' declared here}}
1574
1591
::new(static_cast<void*>(&f1)) decltype(f1){1};
@@ -1625,6 +1642,8 @@ void aggregate() {
1625
1642
S::foo(S{.s1 = 100, .s4 = 100});
1626
1643
S::foo(S{.s1 = 100}); // expected-warning {{field 's4' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_S4 {{'s4' declared here}}
1627
1644
1645
+
(void)sizeof(S{}); // no warning -- unevaluated operand
0 commit comments