OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [partial11.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// DR 115
2
 
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.
8
 
9
// Here, deduction is not done to resolve fn 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.
13
 
14
template  void def(Fn fn, Fn fn2);
15
 
16
template  T2 fn(T1, T2);
17
template  int fn(T1);
18
 
19
int f(int,int);
20
 
21
int main()
22
{
23
  def(fn,f);            // { dg-error "" }
24
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.