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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [overload15.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do assemble  }
2
// Test resolution of templatized overloaded constructors.
3
// The more specialized constructor, i.e., A (const B &b)
4
// should be chosen per \S 14.5.5.2/2 [temp.func.order/2].
5
 
6
template 
7
struct B {
8
  int f;
9
};
10
 
11
struct A {
12
  template 
13
  A (const B &b) {}
14
 
15
  template 
16
  A (const T &b) {}
17
};
18
 
19
int
20
main ()
21
{
22
  B<2,3> b;
23
  A a (b);
24
  return 0;
25
}

powered by: WebSVN 2.1.0

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