1 | template <typename T> struct A { |
---|---|
2 | }; |
3 | |
4 | template <> struct A<int> { |
5 | struct B { |
6 | int f; |
7 | }; |
8 | }; |
9 | |
10 | template <> struct A<bool> { |
11 | struct B { |
12 | int g; |
13 | }; |
14 | }; |
15 | |
16 | |
17 | template <typename T> constexpr int f() { return 0; } |
18 | template <> constexpr int f<int>() { return 4; } |
19 |