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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [template-2.mm] - Blame information for rev 703

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 703 jeremybenn
/* Test if ObjC classes (and pointers thereto) can participate
2
   in C++ overloading.  Correct handling of cv-qualifiers is
3
   key here.  */
4
/* Author: Ziemowit Laski .  */
5
 
6
/* { dg-do compile } */
7
 
8
@interface foo {
9
  int a, b;
10
}
11
@end
12
 
13
struct bar {
14
  int c, d;
15
};
16
 
17
template 
18
struct allocator {
19
  typedef _Tp*       pointer;
20
  typedef const _Tp* const_pointer;
21
  typedef _Tp&       reference;
22
  typedef const _Tp& const_reference;
23
 
24
  pointer address(reference __x) const { return &__x; }
25
  const_pointer address(const_reference __x) const { return &__x; }
26
};
27
 
28
allocator b;
29
allocator d;

powered by: WebSVN 2.1.0

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