windbg_to_c icon indicating copy to clipboard operation
windbg_to_c copied to clipboard

static_assert at the end

Open swwwolf opened this issue 8 years ago • 1 comments

I'm suggesting to add a static_assert after generated structure to check it's size.

static_assert(sizeof(BLAH_BLAH_BLAH) == 0x20, "Invalid BLAH_BLAH_BLAH size");

Also, you can use intellectually (somehow) choosen asserts like:

static_assert(FIELD_OFFSET(BLAH_BLAH_BLAH, SomeMember) == 0x18, "Invalid SomeMember offset");

swwwolf avatar Jul 07 '17 08:07 swwwolf

Yes I had planned to add something like that but never got around to it.

I'll see what I can do.

markhc avatar Jul 19 '17 11:07 markhc