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>. */ 5 6/* { dg-do compile } */ 7 8@interface foo { 9 int a, b; 10} 11@end 12 13struct bar { 14 int c, d; 15}; 16 17template <class _Tp> 18struct 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 28allocator<bar *> b; 29allocator<foo *> d; 30