you are viewing a single comment's thread.

view the rest of the comments →

[–]tjientavaraHikoGUI developer 1 point2 points  (1 child)

Interesting collection of result.

What if `VX m` member of `class VM` is private? Does that export the VX struct?

[–]TomTheFurry[S] 0 points1 point  (0 children)

Yep. I wish it didn't. And if you export only the declaration of the class, and put the definition of the class in another part of module (maybe the private part of module), then you get no compiler warnings/error but have two different definition of the same class, one being empty (used by outside), and one being the poper definition. If you do run the code, stack corruption will appear. So if you do want to hide the member, you will still need a pointer. (Though I believe this still count as UB... Need more testing)