OSDN Git Service

new
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / memclass4.C
1 #include <typeinfo>
2
3 template <class T>
4 struct allocator {
5   typedef T*        pointer;
6
7   template <class U> struct rebind {
8     typedef allocator<U> other;
9   };
10 };
11
12 template <class T, class Allocator>
13 struct alloc_traits
14 {
15   typedef typename Allocator::template rebind<T>::other allocator_type;
16 };
17
18 int main ()
19 {
20   typedef alloc_traits<int, allocator<void> >::allocator_type at;
21
22   return typeid (at) != typeid (allocator <int>);
23 }