Friday, April 2, 2021

typename keyword in C++ template

The purpose of this document is to describe the reasoning behind the inclusion of the typename keyword in standard C++, and explain where, when, and how it can and can't be used.

Note: This page is correct (AFAIK) for C++98/03. The rules have been loosened in C++11.

  1. Dependant Name Hell
  2. When to use the typename keyword to identify dependent types, and when not to.

  3. A Description of the C++ typename keyword
  4. The purpose of this document is to describe the reasoning behind the inclusion of the typename keyword in standard C++, and explain where, when, and how it can and can't be used.

    Note: This page is correct (AFAIK) for C++98/03. The rules have been loosened in C++11..

  5. C++ template typename iterator
  6. Consider the following header file:

  7. Down with typename in the Library!
  8. good paper, complete

  9. std::map::const_iterator template compilation error
  10. I have a template class that contains a std::map that stores pointers to T which refuses to compile:

  11. How to write a C++11 template that can take a const iterator
  12. This is a paragraph.

  13. use of const iterator in template function
  14. This is a paragraph.

  15. Dependent names
  16. very informative.

  17. How to correctly implement custom iterators and const_iterators?
  18. This is a paragraph.

    Focus on Template

  19. cv (const and volatile) type qualifiers
  20. Appear in any type specifier, including decl-specifier-seq of declaration grammar, to specify constness or volatility of the object being declared or of the type being named.

    1. const - defines that the type is constant.
    2. volatile - defines that the type is volatile.

  21. Explicit (full) template specialization
  22. Allows customizing the template code for a given set of template arguments.

  23. Determine Information about System, User, Processes, Hardware...
  24. The never ending 'How do I find' article. Will be updated regularly!

No comments:

Post a Comment