ltimaginea
ltimaginea
@shaneasd In my opinion, the class Foo's data members are standard-library container types (incl. `string`) and the `int` type, they can handle self-assignment elegantly and efficiently. That's why it has...
@jwakely OK, I have understood that C.65 the final example is a "don't do it this way" example. However, it is too misleading for readers. I think the final example...
@CutieDeng Hi,朋友,感谢交流。 关于上条评论中,你的代码的不足之处在于: - `decltype(ptr) :: element_type` 获得的是基类类型,因此将会发生slicing(切片),见 [ES.63: Don't slice - C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Res-slice) 。 - 多态基类UnsafeClass忘记了将其析构函数定义为 **virtual** 的,见 [C.127: A class with a virtual function should have a...