What's the difference between the following two declarations:
But use typename to identify nested dependent type names, except in base class lists or as a base class identifier in a member initialization list.
prev | next
template<class T> class Widget; // uses "class" template<typename T> class Widget; // uses "typename"When declaring template parameters, class and typename are interchangeable.
But use typename to identify nested dependent type names, except in base class lists or as a base class identifier in a member initialization list.
prev | next
No comments:
Post a Comment