博客

We are defining assignment operators wrong.

Update: Apparently there is a WG21 paper on this subject that goes in much more detailed than my post. I am surprised that I missed his CppCon talk on this topic and come into the silimar conclusion…

CppCon 2019 Trip Report

What a week we had! CppCon 2019 is by far the best CppCon that I've ever attended. There are contents that interest me on every time slot, and for a lot of time there are conflict so that it is hard…

ACM Siggraph 2019会议小结

今年几个在 Trimble SketchUp 的同事与我一起去参加了ACM Siggraph 大会 。这是我第一次参加这种规模的大会。这一周虽然非常辛苦,但我也开阔了眼界并且学到了很多东西。 今年大会的地点在洛杉矶,所以我们有机会去参观渔人码头,品味不同的海鲜,并且欣赏海上的日落。我们也开了一些图形学有关的玩笑, 诸如渔人码头的木头地板是一张置换贴图(displacement map…

X86 "lea" 指令背后的直觉

一些朋友们在之前的 北丹佛地区C++聚会 上提到X86指令中的 lea 并不如其他的指令那么好理解。 lea 是“load effective address”的缩写,一般来说被解释为“把某个内存地址从放到目标位置”。在Intel汇编语法下, lea 被写作 举一个例子, 如果我们有一个 struct Point 的数组 points : 当遇到 int x = points[i…

When does a C++ temporary object die?

A lot of operations of C++ require temporary values. Using them before their destruction is imperative. However, not all C++ programmers I met have a solid understanding of when a temporary expire…