Viladoman / StructLayout

Visual Studio Extension for C++ struct memory layout visualization
MIT License
480 stars 22 forks source link

Suggested feature: Intellisense annotation for struct size. #5

Open Convery opened 4 years ago

Convery commented 4 years ago

Given that programmers that care about how their structures look are often interested in the size as well, it might be useful to include an annotation for sizeof(Struct) in the code (and struct view) =)

Viladoman commented 4 years ago

If I understand correctly, your suggestion is to add the sizeof(T) also in the text window when hovering on top of the type with the QuickInfo? If so, that is a pretty nice idea, but it would require some constant background parsing to get all text editors up to date.

At least, at the moment that information for the queried structure is already in the Extension window, at the bottom right and in the nodes tooltip. image image

I think the bottom right text might need to be more obvious.

Correct me if I am wrong. I might have misunderstood your request.

Convery commented 4 years ago

Was thinking more about something inlined, like an opaque comment or an on-hoover popup: bild

Kochise commented 3 years ago

And what about #pragma pack ?