| 1 | template<typename T, unsigned value> |
|---|---|
| 2 | struct C { |
| 3 | T member = value; |
| 4 | }; |
| 5 | |
| 6 | C<int, 2> temp1; |
| 7 | |
| 8 | template <typename T, T value> struct Foo {}; |
| 9 | Foo<short, -2> temp2; |
| 10 | Foo<char, 'v'> temp3; |
| 11 | Foo<float, 2.0f> temp4; |
| 12 | Foo<double, -250.5> temp5; |
| 13 | Foo<int *, &temp1.member> temp6; |
| 14 | Foo<_Float16, _Float16(1.0)> temp7; |
| 15 | Foo<__bf16, __bf16(1.0)> temp8; |
| 16 | |
| 17 | template <typename T, T... values> struct Bar {}; |
| 18 | Bar<double, 1.2> temp9; |
| 19 | Bar<float, 1.0f, 2.0f> temp10; |
| 20 | |
| 21 | int main() {} |
| 22 |
