gcc/testsuite/g++.dg/template/incomplete6.C
raw| 1 | // PR c++/48115 |
| 2 | |
| 3 | template<typename> struct templ { }; |
| 4 | |
| 5 | template<typename T> T declval(); |
| 6 | |
| 7 | typedef int (*F2)(...); |
| 8 | |
| 9 | template<int> struct Int { }; |
| 10 | |
| 11 | template<typename F, typename T> |
| 12 | struct S |
| 13 | { |
| 14 | template<typename A> |
| 15 | Int<sizeof( declval<F>()(T()) )> |
| 16 | f(A); |
| 17 | }; |
| 18 | |
| 19 | int main() |
| 20 | { |
| 21 | S<F2, templ<int> >().f(0); |
| 22 | } |