上一页 1 ··· 4 5 6 7 8

2019年7月4日

用lambda表达式和std::function类模板改进泛型抽象工厂设计

摘要: 阅读全文

posted @ 2019-07-04 11:17 patton88 阅读(251) 评论(0) 推荐(0) 编辑

2019年7月3日

C++11实现可变参数泛型抽象工厂

摘要: 阅读全文

posted @ 2019-07-03 09:13 patton88 阅读(391) 评论(0) 推荐(0) 编辑

2019年2月7日

Vnc自动登录器(VncManager)v1.3-多国语言绿色版-Release1-20190215

摘要: Vnc自动登录器 v1.3 (20190215) By: ybmj@vip.163.com , https://www.cnblogs.com/ybmj/ 下载地址:http://bbs.wuyou.net/forum.php?mod=viewthread&tid=413044&page=1&ext 阅读全文

posted @ 2019-02-07 14:56 patton88 阅读(1018) 评论(0) 推荐(0) 编辑

2018年9月15日

获得函数返回值类型、参数tuple、成员函数指针中的对象类型

摘要: //function_traits.h,获得函数返回值类型、参数tuple、成员函数指针中的对象类型 //参考https://github.com/qicosmos/cosmos/blob/master/function_traits.hpp,进行了精简和补充 #pragma once #include #include //类模板原型 template struct function_t... 阅读全文

posted @ 2018-09-15 16:11 patton88 阅读(372) 评论(0) 推荐(0) 编辑

2017年12月24日

运行期以索引获取tuple元素-C++17

摘要: //运行期以索引获取tuple元素-C++17 //需支持C++17及以上标准的编译器,VS2017 15.5.x、CodeBlocks 16.01 gcc 7.2 //参见:http://purecpp.org/?p=1581 #include #include using namespace std; template void visit(T& tup, size_t i) { ... 阅读全文

posted @ 2017-12-24 00:36 patton88 阅读(375) 评论(0) 推荐(0) 编辑

2017年12月23日

遍历输出tuple元素的简洁方式(C++11)

摘要: //遍历输出tuple元素的简洁方式(C++11) //Win32Con17_VS2017_01.cpp #include #include using namespace std; template void myprint_impl(tuple tup) //泛化版本 { //cout (tup) ::value > 1) ? ", " : ""); //... 阅读全文

posted @ 2017-12-23 22:59 patton88 阅读(1139) 评论(0) 推荐(1) 编辑

运行期以索引获取tuple元素-C++14(原创)

摘要: 在编译期很容易根据索引来获取对应位置的元素,因为 tuple 的帮助函数 std::get<N>(tp) 就能获取 tuple 中第 N 个元素。然而我们却不能直接在运行期通过变量来获取 tuple 中的元素值,比如下面的用法: 这样写是不合法的,会报一个需要编译期常量的错误。 要通过运行时的变最米 阅读全文

posted @ 2017-12-23 18:08 patton88 阅读(725) 评论(0) 推荐(0) 编辑

2017年12月22日

运行期以索引获取tuple元素-C++11之1

摘要: //运行期以索引获取tuple元素-C++11之1 //需支持C++11及以上标准的编译器,VS2017 15.5.x、CodeBlocks 16.01 gcc 7.2 //参见《深入应用C++11:代码优化与工程级应用》p147,祁宇,机械工业出版社,2015年05 #include #include using namespace std; template typename ena... 阅读全文

posted @ 2017-12-22 17:39 patton88 阅读(244) 评论(0) 推荐(0) 编辑

运行期以索引获取tuple元素-C++11之2

摘要: //运行期以索引获取tuple元素-C++11之2 //需支持C++11及以上标准的编译器,VS2017 15.5.x、CodeBlocks 16.01 gcc 7.2 //参见《深入应用C++11:代码优化与工程级应用》p148,祁宇,机械工业出版社,2015年05 #include #include using namespace std; template void GetArgBy... 阅读全文

posted @ 2017-12-22 17:38 patton88 阅读(201) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8

导航

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8
点击右上角即可分享
微信分享提示