摘要: 将博客搬至CSDN 阅读全文
posted @ 2022-03-03 13:20 ConfuciusPei 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 微软这个坑货,白瞎我一早上。 问题复现 用vs2019创建一个工程,然后修改windows sdk 到8.1;结果现有代码就编译不通过了,出现以上错误。 使用排除法,缩小问题,最终排除到编译一个仅仅包含#include <windows.h>一行代码的cpp文件也会出问题。 同样的代码,现有工程没问 阅读全文
posted @ 2020-06-18 13:57 ConfuciusPei 阅读(1884) 评论(0) 推荐(0) 编辑
摘要: c++ filesystem 来源: http://www.modernescpp.com/index.php/c 17 more details about the library https://www.bfilipek.com/2017/08/cpp17 details filesystem. 阅读全文
posted @ 2020-03-29 21:28 ConfuciusPei 阅读(7076) 评论(1) 推荐(1) 编辑
摘要: vc++的调用约定 32 bit x86 调用约定 本文只讨论微软编译器用到的调用约定,不讨论windows以外的操作系统,也不讨论vc++以外的编译器 说到调用约定,大家应该知道c++成员函数的第一个参数是this指针。 开始 32位的x86 的调用约定都会保存EDI, ESI, EBP, EBX 阅读全文
posted @ 2020-03-19 19:50 ConfuciusPei 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 来源:https://isocpp.org/blog/2012/11/universal references in c11 scott meyers 参考:http://bajamircea.github.io/coding/cpp/2016/04/07/move forward.html c++ 阅读全文
posted @ 2020-03-13 11:38 ConfuciusPei 阅读(1324) 评论(0) 推荐(0) 编辑
摘要: 来源: https://stackoverflow.com/questions/9017573/define preprocessor macro through cmake https://stackoverflow.com/questions/28597351/how do i add a li 阅读全文
posted @ 2020-03-06 17:05 ConfuciusPei 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 来源:https://stackoverflow.com/questions/14361992/dll load library error code 126 这个问题通常是依赖的dll确实造成的,或者直接依赖,或者间接依赖。 查找办法有两个: 使用 dependency walker 使用 sys 阅读全文
posted @ 2020-03-02 09:48 ConfuciusPei 阅读(855) 评论(0) 推荐(0) 编辑
摘要: 翻译自:https://stackoverflow.com/questions/3652056/how efficient is locking an unlocked mutex what is the cost of a mutex 一个锁,锁很多数据;还是一个数据一个锁? 如果有很多线程频繁的 阅读全文
posted @ 2020-02-24 22:01 ConfuciusPei 阅读(782) 评论(0) 推荐(0) 编辑
摘要: std::mutex mutex代表的是MUTual EXclusive(禁止同时访问),通过memory barrier来实现。不同平台实现不一样,这里不深究了。 线程安全队列 使用std::lock_guard,不需要主动unlock了 std::unique_lock可以通过unlock来解锁 阅读全文
posted @ 2020-02-24 15:31 ConfuciusPei 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 参考:https://stackoverflow.com/questions/14418352/ignore new commits for git submodule 没怎么看明白,原文的解释: 阅读全文
posted @ 2020-02-22 14:43 ConfuciusPei 阅读(370) 评论(0) 推荐(0) 编辑