Unused fields are not removed
Predelnik opened this issue · comments
Header:
#pragma once
struct C { using type = int; };
struct D { C::type v; };
And use only class D
in actual code.
That's very simplified example but obviously it leads to inability to use any sort of your own type trait in library code.
Does it only happen if the field v
is unused?
Yeah it looks like assigning to v
explicitly makes it work fine. Should this still work even if v
is unused though because it doesn't get removed anyway?
This should be fixed now. (Although some unused fields still don't get removed, at least it won't cause compilation failure.)