Guest User

Untitled

a guest
Mar 21st, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. template<typename T1, typename T2, typename T3, typename T4, int S>
  2. struct message;
  3. struct Size;
  4. struct of;
  5. struct is;
  6. #define PRINT_SIZE(x) message<Size, of, x, is, sizeof(x)> _##x
  7.  
  8. struct A {
  9. unsigned char field_0;
  10. };
  11.  
  12. struct B {
  13. unsigned short field_0;
  14. };
  15.  
  16. struct C {
  17. unsigned int field_0;
  18. unsigned char field_4;
  19. };
  20.  
  21. PRINT_SIZE(A);
  22. PRINT_SIZE(B);
  23. PRINT_SIZE(C);
Add Comment
Please, Sign In to add comment