fork(1) download
  1. #include <iostream>
  2. #include <type_traits>
  3.  
  4. struct A
  5. {
  6. int x1234;
  7. short x56;
  8. char x7;
  9. };
  10.  
  11. struct B : A
  12. {
  13. char x8;
  14. };
  15.  
  16. int main() {
  17. std::cout << sizeof(A) << ' ' << sizeof(B) << '\n';
  18.  
  19. std::cout << std::is_pod<A>::value << ' ' << std::is_pod<B>::value << '\n';
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
8 12
1 0