Stefan Koch

Results 55 comments of Stefan Koch

this is because llvm.js uses a diffrent llvm-version. The bytecode format is incompatible I'm working on fixing this.

This implementation will have rather bad compile-time performance. Please count how many instances will be created for a `Layout` with 4,8,32 fields.

sadly it does not seem to work @andralex please try: ``` { struct S { uint u; char[64] c64; long l1, l2, l3, l4, l5, l6; union { S* s;...

> template instantiation is pure [...] @John-Colvin only if you are playing nice :p

@andralex I think we have a `isSame` template. which should do some sort of compare for you.

@andralex I'd like to see a usecase for this.

It's trivially done with core.reflect. https://forum.dlang.org/thread/[email protected]

> I think `static assert` or `pragma(msg)` in conjunction with `sizeof` and `offsetof` is plenty good: > > ```d > @safe struct S { > char a; > char b;...

I'll leave the completed version here that also tells you where the padding is ```` // detect padding in aggregates import core.reflect.reflect; import core.reflect.transitiveVisitor; import std_stdio = std.stdio; struct PadDetctedTuple...

> Awkward, but simple and can be simplified and packaged further: https://run.dlang.io/is/NLOSNA @andralex Do you mind if I use this as example code to contrast it with core.reflect for my...