摘要: Type Alias (similar to typedef) // typedef void (*func)(int, int) using func = void (*) (int, int); // the name 'func' now denotes a pointer to functi 阅读全文
posted @ 2020-11-18 21:08 Codroc 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Variadic Template 谈的是 template function template class template 变化的是 template parameters 参数个数 (variadic number) 利用参数个数逐一递减的特性,实现递归函数调用,使用 function tem 阅读全文
posted @ 2020-11-18 21:05 Codroc 阅读(146) 评论(0) 推荐(0) 编辑
摘要: =default, =delete 如果你自行定义一个 ctor,那么编译器就不会再给你一个 default ctor(包括了构造函数,拷贝构造函数,拷贝赋值函数)。 如果你强制加上了 =default,就可以重新获得并使用 default ctor。 Big Three 就是所谓的: 构造函数 拷 阅读全文
posted @ 2020-11-18 10:27 Codroc 阅读(108) 评论(0) 推荐(0) 编辑