How to understand the Concepts in Clover 20
The purpose of this article is to share with you about how to understand the Concepts in Category 20. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article.
Powerful generic programming
Basically since the emergence of the C++ language, generic programming has been an important part of C++. With programming, it can be used many times at one time without losing precision. It's perfect. For example, we can implement a simple template addition function that can handle multiple data types:
TemplateT add (T in1, T in2) {return in1 + in2;}
Once you have this template function, you can use it to deal with various data types. For example:
Std::cout