gcc/testsuite/g++.dg/cpp0x/variadic-unify-3.C
raw| 1 | // PR c++/80150 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | template <typename R, typename... Args> |
| 5 | bool compare_functions(R(*funcA)(Args...), R(*funcB)(Args...), Args... args) { |
| 6 | return false; |
| 7 | } |
| 8 | |
| 9 | int foo(int x) { |
| 10 | return x; |
| 11 | } |
| 12 | |
| 13 | float foo(float x) { |
| 14 | return x; |
| 15 | } |
| 16 | |
| 17 | int main() { |
| 18 | int a = 10; |
| 19 | compare_functions<int>(foo, foo, a); |
| 20 | } |