keyword typename

From Cppwiki

Jump to: navigation, search


This page is a stub. Please feel free to expand it. (list of stubs)

The typename keyword is used in template definitions. It can be used (inter-changably with class in template parameter lists, it can also be used to indicate that the following symbol should be treated as a type, rather than as a member function or static member variable.

template<typename Container>

 typename Container::size_type size(Container const & c) {
   return t.size();
 }


See also: template, class, Template metaprogramming

Personal tools