Empty struct, any runtime cost?

Jacob Carlborg via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Aug 19 10:58:15 PDT 2015


On 2015-08-19 16:05, Nicholas Wilson wrote:

> I'd be surprised if it didn't, but you can always check the disassembly.
> If for some reason either the compiler doesn't remove it (it never
> removes classes btw but not sure about structs) or the linker
> doesn't discard it you can try -gcsections ( or w/e its called ).

I think the compiler still generates typeinfo for it.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list