PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / template / partial11.C
blobb5ceaa883f57e2855946dadb3014a09f24b70995
1 // DR 115
3 // 14.8.1: In contexts where deduction is done and fails, or in contexts
4 // where deduction is not done, if a template argument list is specified
5 // and it, along with any default template arguments, identifies a single
6 // function template specialization, then the template-id is an lvalue for
7 // the function template specialization.
9 // Here, deduction is not done to resolve fn<int> because the target type
10 // is a template parameter, so we resolve to the second template, and then
11 // the call to def fails because we deduce different values of Fn for the
12 // two function arguments.
14 template <class Fn> void def(Fn fn, Fn fn2);
16 template <class T1, class T2> T2 fn(T1, T2);
17 template <class T1> int fn(T1);
19 int f(int,int);
21 int main()
23   def(fn<int>,f);               // { dg-error "" }