最新发布
c++ - 如何在删除元素时防止重新散列 std::unordered_map
我有一个 std::unordered_map,我将从迭代中删除元素。 auto itr = myMap.begin(); while (itr !=...
8小时前 0 编程设计
c++ - is_convertible is_assignable 有什么区别
is_convertible 和 is_assignable 有什么区别? 为什么, 在 vs2012 中 is_convertible<...
8小时前 0 编程设计
c++ - addr2line 中的 "discriminator"是什么
在某些程序中运行 addr2line 时,我在行尾收到“鉴别器 N”注释: main at/tmp/nsievebits.c:56(鉴别器 3) 手...
8小时前 0 编程设计
c++ - 如何控制 C 数学是否使用 SSE2
我在 fp:strict 模式下使用 MSVC 进入了 C 库的超越数学函数的汇编。它们似乎都遵循相同的模式,这就是 sin 发生的情况。 首先有一个来自...
8小时前 0 编程设计
c++ - 阻止异步的解决方法
下面的 async 调用正在阻塞,因为返回的 future 的析构函数正在阻塞: void foo() {} void foo_async() {...
8小时前 0 编程设计
C++11 向后兼容性
我可以使用 c++11 中的任何东西并期望编译后的二进制文件可以在旧系统上运行吗?我如何知道 c++11 的哪些部分是 libstdc++.so 的一部分,以及...
8小时前 0 编程设计
c# - TCP延迟确认的解决方法是什么
我已经发布了一个在线(基于网格)视频游戏,它使用 TCP 协议(protocol)来确保服务器-客户端网络拓扑中的可靠通信。我的游戏运行良好,但延迟高于预期(该...
8小时前 0 编程设计
C++ : Association, 聚合和组合
我开始研究 OOAD,但我很难找到一个 C++ 代码示例来说明 Association、Aggregation 如何和 Composition 以编程方式实现。...
8小时前 0 编程设计
c++ - 指向数组重叠数组末端的指针
这段代码正确吗? int arr[2]; int (*ptr)[2] = (int (*)[2]) &arr[1]; ptr[0][0...
8小时前 0 编程设计
c++ - 覆盖 [[noreturn]] 虚函数
[[noreturn]] 属性可以应用于不打算返回的函数。例如: [[noreturn]] void will_throw() { throw std::...
8小时前 0 编程设计
c++ - 避免返回的 const locals
我一直认为 const locals 是 const 是件好事 void f() { const resource_ptr p = get();...
8小时前 0 编程设计
c++ - 在什么时候发生模板实例化绑定(bind)
此代码来自 Bjarne Stroustrup 的“C++ 编程语言”(C.13.8.3 实例化绑定(bind)点) template <class...
8小时前 0 编程设计
c++ - Windows Subsystem for Linux (WSL) 下的间歇性随机 'file not found' 错误
当包含 C++ 头文件时,在 Windows 子系统 (WSL) 中运行的 Ubuntu 16.04.2 下使用 gcc 4.8 或 clang 3.8 构建...
8小时前 0 编程设计
c++ - C++ 中是否有标准的循环迭代器
基于以下问题:Check if one string is a rotation of other string 我正在考虑制作一个带有范围的循环迭代器...
8小时前 0 编程设计
c++ - 我误解了 assert() 的用法吗
我在看the assert() reference page当我阅读给定的示例时,我被卡住了: /* assert example */ #includ...
8小时前 0 编程设计