Standalone examples on templates. You can explore them in Compiler Explorer.
The folder contains following examples:
template_function.cpp— function template basicstemplate_function_point.cpp— function template with a user-defined typetemplate_specialization.cpp— template specializationtmpt_enable_if.cpp— constraining templates withstd::enable_iftmpt_concepts.cpp— constraining templates with conceptstmpt_crtp.cpp— static polymorphism with CRTP
Note: tmpt_enable_if.cpp and tmpt_concepts.cpp contain a call that
intentionally fails to compile, to show the resulting compiler errors.