Patching STB_GNU_UNIQUE of Buggy Binaries
开源工具链里有很多陈年小 "feature", 最初由于各种原因 (例如作为 workaround) 实现了之后, 即使语义模糊或设计不合理, 也因为兼容性被留到了今天.
开源工具链里有很多陈年小 "feature", 最初由于各种原因 (例如作为 workaround) 实现了之后, 即使语义模糊或设计不合理, 也因为兼容性被留到了今天.
This is a summary of the algorithms I used to write OpenPano: an open source panorama stitcher. You can find the source code on github.
std::tuple
是 C++11 中的一个好东西. 它功能上算是std::pair
的扩展,
但有一些其他的用法.
例如, 可以借用 tuple 来模拟多值返回 (python 中也是这样), SugarCpp 中就是使用 tuple 实现了简洁的多值返回语法:
tuple<T, T> sort<T>(a: T, b: T) return a < b ? (a, b) : (b, a)
tuple 也可以用于模拟 python 中的 Parallel Assignment: