You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### What problem were solved in this pull request?
Issue Number: #523
Problem:
- Missing C++ template programming exercises, affecting contributors'
understanding and application of C++ templates
- Need to enhance the cpplings exercise collection to support the goal
of Issue #508
### What is changed and how it works?
- Added template_basics.cpp file, implementing:
- Basic function template examples showing how to create generic
functions
- Class template implementation and usage, demonstrating definition and
usage of generic classes
- Template specialization techniques with a specialized version for
string type
- Recursive implementation of variadic templates, showing how to handle
variable parameter lists
- SFINAE technique application, selecting different function
implementations based on type traits
- Added comprehensive comments explaining template programming concepts
and use cases
- Included complete test code to ensure examples run correctly
### Other information
- Run the test case with `./bin/cpplings template_basics`
- Parent Issue: #508 (add more cpplings case)
0 commit comments