gcc/testsuite/g++.dg/cpp23/auto-fncast10.C
raw| 1 | // { dg-do compile { target c++23 } } |
| 2 | |
| 3 | struct S { |
| 4 | int i1 : auto(12); |
| 5 | int i2 : auto{12}; |
| 6 | static constexpr auto x = auto(12); |
| 7 | static constexpr auto y = auto{12}; |
| 8 | }; |
| 9 | |
| 10 | struct R { |
| 11 | int i; |
| 12 | }; |
| 13 | |
| 14 | static constexpr R r1 = { auto(23) }; |
| 15 | static constexpr R r2 = { auto{23} }; |
| 16 | enum E { X = auto(12), Y = auto{1u} }; |
| 17 | static_assert (auto(true)); |
| 18 | static_assert (auto{true}); |