Templated Struct and Class

I have a struct the represents a node in a linked list that I want to template:

template <class T>
struct ListNode
{
T comp;
ListNode<T> *link;
}

Now I want to have a class to leverage this list, that is templated with the same type as the struct.

template <class T>
class LinkedList
{
....
ListNode<T> *firstElement;
....
}

Will this ensure that the struct and my class share the same type at runtime, or would I need to define the templating in a different manner? Any advice would be very much appreciated.
Yes, ListNode will receive the same type that is passed to the template parameter of LinkedList.
Topic archived. No new replies allowed.