Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / obj-c++.dg / template-2.mm
blob346dab6c2ec62fa2a7af7199d69849215eef889f
1 /* 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 <zlaski@apple.com>.  */
6 /* { dg-do compile } */
8 @interface foo {
9   int a, b;
11 @end
13 struct bar {
14   int c, d;
17 template <class _Tp>
18 struct allocator {
19   typedef _Tp*       pointer;
20   typedef const _Tp* const_pointer;
21   typedef _Tp&       reference;
22   typedef const _Tp& const_reference;
24   pointer address(reference __x) const { return &__x; }
25   const_pointer address(const_reference __x) const { return &__x; }
28 allocator<bar *> b;
29 allocator<foo *> d;