From Jason Turner
Watch on YouTube

Summary

Jason explores the difference between using 'typename' and 'class' keywords in C++ templates. He explains that for most template parameters, these keywords are functionally identical and interchangeable, with the choice being purely stylistic. Jason personally prefers 'typename' as it more clearly indicates that any type can be used, not just class types. He identifies one historical exception (template templates) where 'class' was mandatory, though notes in the video description that C++17 now also allows 'typename' in this context.

Resources

Tags