2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / memclass4.C
blob04e3acef9846e357bb7598c2faa0ae5e1557b93a
1 // { dg-do run  }
2 #include <typeinfo>
4 template <class T>
5 struct allocator {
6   typedef T*        pointer;
8   template <class U> struct rebind {
9     typedef allocator<U> other;
10   };
13 template <class T, class Allocator>
14 struct alloc_traits
16   typedef typename Allocator::template rebind<T>::other allocator_type;
19 int main ()
21   typedef alloc_traits<int, allocator<void> >::allocator_type at;
23   return typeid (at) != typeid (allocator <int>);