滥用 Unicode Bidi 及其带来的 Trojan Source 问题
https://www.zhihu.com/question/646854372/answer/1918712296680724423
https://github.com/nickboucher/trojan-source
对这种代码,GitHub 在线编辑器也特地给出了警告
https://www.zhihu.com/question/646854372/answer/1918712296680724423
https://github.com/nickboucher/trojan-source
对这种代码,GitHub 在线编辑器也特地给出了警告
GitHub
GitHub - nickboucher/trojan-source: Trojan Source: Invisible Vulnerabilities
Trojan Source: Invisible Vulnerabilities. Contribute to nickboucher/trojan-source development by creating an account on GitHub.
xmake 在 macOS 上的 bug:使用 clang 时无法使用 std 模块(已排除编译器问题)
https://github.com/xmake-io/xmake/issues/6562
https://github.com/xmake-io/xmake/issues/6562
GitHub
无法在 macOS 上使用 std 模块 (clang) · Issue #6562 · xmake-io/xmake
Xmake 版本 v3.0.0+20250615 操作系统版本和架构 macOS Sequoia 15.5 arm64 描述问题 无法在 macOS 上使用 std 模块 (clang) 期待的结果 使用原始的编译命令: clang++ -std=c++23 -stdlib=libc++ -Wno-reserved-identifier -Wno-reserved-module-identi...
顺便附上一份 clang 使用 std 模块的编译命令:
clang++ -std=c++23 -stdlib=libc++ -Wno-reserved-identifier -Wno-reserved-module-identifier --precompile -o std.pcm /path/to/libc++/v1/std.cppm
clang++ -std=c++23 -stdlib=libc++ -fmodule-file=std=std.pcm main.cpp
New C++
xmake 在 macOS 上的 bug:使用 clang 时无法使用 std 模块(已排除编译器问题) https://github.com/xmake-io/xmake/issues/6562
把 xmake.lua 中的
但这也太神秘了
看下 clang 那个后续有没有说法
set_toolchains("clang")
改为 set_toolchains("llvm")
可解决但这也太神秘了
看下 clang 那个后续有没有说法
笔记:When Nanoseconds Matter, Ultrafast Trading Systems in C++
https://zhuanlan.zhihu.com/p/1917316511711867603
https://cppcon.org/2024grossprerelease/
https://zhuanlan.zhihu.com/p/1917316511711867603
https://cppcon.org/2024grossprerelease/
对于继承和虚函数的“滥用”反而是被发现的,是需求创造了这些复杂设计
https://www.zhihu.com/question/547885140/answer/2626923970
https://www.zhihu.com/question/547885140/answer/2626923970
New C++
重新研究了一会之后我确信 argparse 在 xmake-repo 中的远程包并没有做 modules 支持 所以,我出手了(暂时还没有,预定一个坑位先)
出手了一半,给 argparse 发了个 PR 修复一下自带的 xmake.lua 在模块支持这块的 bug
https://github.com/p-ranav/argparse/pull/406
等合并之后去修改 xmake-repo
https://github.com/p-ranav/argparse/pull/406
等合并之后去修改 xmake-repo
GitHub
Fix C++ Modules support in xmake.lua by KeqingMoe · Pull Request #406 · p-ranav/argparse
The current argparse provides an xmake.lua, but for unknown reasons, it is not used by the argparse remote package in xmake-repo, and that remote package doesn't provide C++ Modules support...
P1300R0: Remember the FORTRAN
https://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p1300r0.pdf
https://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p1300r0.pdf
https://www.zhihu.com/question/20200615/answer/2408501062
说得很对,非破坏性移动的缺点很多时候都被忽略了。今年委员会那边好像有重视起来重定位语义/破坏性移动的重要性,但是好像因为一些原因导致暂时没什么搞头
说得很对,非破坏性移动的缺点很多时候都被忽略了。今年委员会那边好像有重视起来重定位语义/破坏性移动的重要性,但是好像因为一些原因导致暂时没什么搞头
类型萃取,树形结构,可视化
https://github.com/16bit-ykiko/magic-cpp
https://www.zhihu.com/question/628409525/answer/3328133464
https://github.com/16bit-ykiko/magic-cpp
https://www.zhihu.com/question/628409525/answer/3328133464
GitHub
GitHub - 16bit-ykiko/magic-cpp: A C++20 header-only library that supports powerful reflection for C++
A C++20 header-only library that supports powerful reflection for C++ - 16bit-ykiko/magic-cpp
P3324R0: Attributes for namespace aliases, template parameters, and lambda captures
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3324r0.html
想到找这个主要是因为每次写
都会被 clang-tidy 弹警告,说我未使用(实际上是在别的地方使用)。查了下并不能加属性,不然就加个
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3324r0.html
想到找这个主要是因为每次写
namespace ranges = std::ranges;
namespace views = std::views;
都会被 clang-tidy 弹警告,说我未使用(实际上是在别的地方使用)。查了下并不能加属性,不然就加个
[[maybe_unused]]
了。.clang-tidy 加个 -misc-unused-alias-decls
解决