1

https://stackoverflow.com/a/15483397/368896では、ポスターは、正しく読んでいれば、クラスが POD にならないようにするには、少なくとも 1 つのデータ メンバーが存在する必要があることを示しています。

class X {};        // This class is a POD
class Y { int y; } // This class is not, because of the presence of the data member

クラスを POD にしないために、少なくとも 1 つのデータ メンバーが必要なのはなぜですか?

4

0 に答える 0