Is CppCoreGuidelines C.21 correct?

后端 未结 2 1381
温柔的废话
温柔的废话 2020-12-08 23:18

While reading the Bjarne Stroustrup\'s CoreCppGuidelines, I have found a guideline which contradicts my experience.

The C.21 requires the following:

2条回答
  •  情书的邮戳
    2020-12-08 23:34

    I think maybe your second example is a reasonable exception, and, after all, the guideline does say "the odds are...", so there will be some exceptions.

    I'm wondering if this slide might help with your first example:

    Here are the slides: https://accu.org/content/conf2014/Howard_Hinnant_Accu_2014.pdf

    EDIT: For further information regarding the first case, I've since discovered this: C++11 virtual destructors and auto generation of move special functions

提交回复
热议问题