从typetraits到concept,一个简单介绍
摘要:## 什么是typetraits? 以标准库中的`std::is_integral`为例,它可以用于判断其类型参数T是否为一个整数类型,我们可以编写如下的示例代码: ```cpp template void print(const T& t){ if(std::is_integral::value)
阅读全文
posted @ 2023-05-29 00:18
posted @ 2023-05-29 00:18