Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/constexpr-prvalue1.C

raw
1 // PR c++/118986
2 // { dg-do compile { target c++20 } }
3 // { dg-options "-O" }
4
5 struct c1 {
6 constexpr c1(int *ptr) {}
7 };
8 struct c2 {
9 c1 _M_t;
10 constexpr ~c2() {}
11 };
12 constexpr inline
13 c2 f1 ()
14 {
15 return c2(new int);
16 }
17
18 void
19 f ()
20 {
21 auto l = [p = f1()](){};
22 [p = f1()](){};
23 }