diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/memclass4.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/memclass4.C | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memclass4.C b/gcc/testsuite/g++.old-deja/g++.pt/memclass4.C new file mode 100644 index 000000000..04e3acef9 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/memclass4.C @@ -0,0 +1,24 @@ +// { dg-do run } +#include <typeinfo> + +template <class T> +struct allocator { + typedef T* pointer; + + template <class U> struct rebind { + typedef allocator<U> other; + }; +}; + +template <class T, class Allocator> +struct alloc_traits +{ + typedef typename Allocator::template rebind<T>::other allocator_type; +}; + +int main () +{ + typedef alloc_traits<int, allocator<void> >::allocator_type at; + + return typeid (at) != typeid (allocator <int>); +} |