Sean Parent 在他的 GBC - Implement Complete Types 演讲中指的是什么缺陷报告

What defect report is Sean Parent referring to in his GBC - Implement Complete Types talk

Sean Parent's talk Goals for Better Coding - implement Complete Types 在 44:10-44:50 肖恩说了一些大意

If I put this [class with a copy assignment operator that accepts its parameter by value, and also has a move constructor] as a member of another class, that other class will not get a default move constructor because the language in the spec does not say "if it is move constructable" it says "has a move constructor with this signature". There is a defect on it, I don't know [what it is] off the top of my head.

任何人都可以指出 Sean 所指的实际缺陷报告吗?

我指的是 1402。来自 Howard Hinnant 的私人通信,2013 年 1 月 22 日:


来自:Howard Hinnant

回复:通过赋值传递(再次)

嗨,肖恩,

2013 年 1 月 22 日,下午 1:26,肖恩 Parent 写道:

I'd like to quote the spec on why this happens - can you send me a pointer to the rule that causes the copy? I'm having a hard time finding the exact rule myself.

参见:

http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1402

跳到问题的底部,那里是最新提议的措辞。你的案例有问题的句子在变更项4中,建议删除的第6个项目符号。

我们,也就是 Jason、Lawrence、Michael 和我自己,在去年 10 月的波特兰会议上就这个方向达成了一致。Jason 提供了详细的拟议决议。现在我们只需要将问题投票到 WP 中并实施(至少在 clang 中)。我刚刚检查了 tip-of-trunk clang,它仍然没有实现。

如果您要说,post 上的这个示例,指向 CWG 1402,然后跳来跳去解释当前行为是多么愚蠢和有害,我敢打赌 Richard Smith 会继续说下去并实施 CWG 1402。:-)

霍华德