#include template struct StaticAssert; template <> struct StaticAssert {}; struct MyPOD { int a; int b; int c; }; StaticAssert<(offsetof(MyPOD, a) == 0)> s;