#include <iostream>
#include <type_traits>
struct base_pod_t {
unsigned x;
};
struct der_pod_t : public base_pod_t { };
int main()
{
std::cout << "base_pod_t is POD: " << std::is_pod<base_pod_t>::value << std::endl;
std::cout << "der_pod_t is POD: " << std::is_pod<der_pod_t>::value << std::endl;
base_pod_t b1 = {}; // OK
base_pod_t b2 = {3}; // OK
der_pod_t p1 = {}; // OK
// der_pod_t p2 = {4}; // ERROR!
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dHlwZV90cmFpdHM+CgoKc3RydWN0IGJhc2VfcG9kX3QgewogICAgdW5zaWduZWQgeDsKfTsKCnN0cnVjdCBkZXJfcG9kX3QgOiBwdWJsaWMgYmFzZV9wb2RfdCB7IH07CgppbnQgbWFpbigpCnsKICAgIHN0ZDo6Y291dCA8PCAiYmFzZV9wb2RfdCBpcyBQT0Q6ICIgPDwgc3RkOjppc19wb2Q8YmFzZV9wb2RfdD46OnZhbHVlIDw8IHN0ZDo6ZW5kbDsKICAgIHN0ZDo6Y291dCA8PCAiZGVyX3BvZF90ICBpcyBQT0Q6ICIgPDwgc3RkOjppc19wb2Q8ZGVyX3BvZF90Pjo6dmFsdWUgPDwgc3RkOjplbmRsOwogICAgYmFzZV9wb2RfdCBiMSA9IHt9OyAgICAgLy8gT0sKICAgIGJhc2VfcG9kX3QgYjIgPSB7M307ICAgIC8vIE9LCgogICAgZGVyX3BvZF90IHAxID0ge307ICAgICAgLy8gT0sKLy8gICAgZGVyX3BvZF90IHAyID0gezR9OyAgIC8vIEVSUk9SIQp9