#include template struct allocator { typedef T* pointer; template struct rebind { typedef allocator other; }; }; template struct alloc_traits { typedef typename Allocator::template rebind::other allocator_type; }; int main () { typedef alloc_traits >::allocator_type at; return typeid (at) != typeid (allocator ); }