recursive tagging pointer structure

Alex sascha.orlov at gmail.com
Wed Jan 23 13:52:26 UTC 2019


Is there a possibility to create a recursive structure with a 
tagged pointer? As this does not compile, even without tagging 
bits.

´´´
import std.experimental.all;

void main(){}

struct A
{
     size_t dummy;
     mixin(taggedPointer!(
         A*, "x"
         /*,
         bool, "b1", 1,
         bool, "b2", 1
         */
     ));
}
´´´
with an error message
source/app.d-mixin-8(8,15): Error: variable `app.A._x_ptr` cannot 
be further field because it will change the determined A size


More information about the Digitalmars-d-learn mailing list