@jonbro i think this is why so many programmers think struct is special, because if you don't use any c++ism you get a "plain old data" layout
@jonbro but that's true for classes like the one in your example
@aeva no c++isms is generally how I write c++ anyways. I don't know why I didn't confirm incorrect belief I had earlier (I thought all function calls went through a vtable)
@jonbro likewise there's no need to typedef your struct like that, you can just do struct name { ... }, and the form is identical
@aeva huh, I wonder why I do that ... I ran into an issue last night with enums where I needed to do that typedef thing or the compiler complained.
@jonbro i guess that's the c way? typedef is not doing any special work here for structs. the struct { ... } form is just a type definition. you could also do alias name = struct { ... }; if you really wanted to be silly
@jonbro i can't think of any reason why a modern c++ compiler would reject one and not the other, certainly not enums. perhaps you had some other bug that you accidentally fixed when reworking the struct?
@aeva cool, question answered!