摘要: title: C++中的编译期反射 date: 2022-11-17 23:15:28 tags: # C++的编译期反射 我们可以利用`__PRETTY_FUNCTION__`这个宏获取当前函数的签名。 比如以下代码: ```cpp #include #include template std:: 阅读全文
posted @ 2023-07-01 19:45 WYFC4 阅读(96) 评论(0) 推荐(0)
摘要: 顺序代码的编写方式 类型转换示例 为输入类型去掉引用并添加const #include<iostream> #include<type_traits> struct fun_ { using RemRef = typename std::remove_reference<T>::type; //us 阅读全文
posted @ 2022-02-07 09:48 WYFC4 阅读(53) 评论(0) 推荐(0)