// Typedef the node that linked_hash will be using internally. typedef _linked_hash_node<Key, Data, HashFcn, EqualKey, Alloc> _Node; // Typedef an allocator for allocating new nodes. typedef typename Alloc::rebind<_Node>::other _Node_Alloc; // Typedef an allocator for allocating node pointers. This will be used in // the internal hash_map and list. typedef typename Alloc::rebind<typename _Node_Alloc::pointer>::other _NodeP_Alloc; // Typedefs for the internal hash_map and list typedef hash_map<Key, typename _Node_Alloc::pointer, HashFcn, EqualKey, _NodeP_Alloc> _Hash_Map; typedef list<_Node*, _NodeP_Alloc> _List;
Example 1: Typedefs of internal template classes.