add new member to copy c-tor/copy o-tor/serialization reminder

前端 未结 4 683
我在风中等你
我在风中等你 2021-01-05 00:10

Almost all c++ projects have classes with copy c-tor/copy operator/serialize method etc. Which usualy doing something with all members.

But sometimes developers forg

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-05 00:39

    I think the best way to avoid this problem is cut it at the root: Don't use custom copy operator/constructor.

    This may not always be possible, but in most cases I really think it is...

提交回复
热议问题