Comment #0 by baiocchi.gabriel — 2022-05-05T21:33:54Z
taggedPointer generates @property accessors for every separate part of the tagged pointer. However, these don't work on a scope reference when compiling with -dip1000:
import std.bitmanip : taggedPointer;
struct S {
mixin(taggedPointer!(
int*, "ptr",
bool, "flag", 1
));
}
void foo(scope ref S s) @safe
{
s.flag; // <- error points here
}
// Error: scope variable `s` assigned to non-scope parameter `this` calling test.S.flag
Comment #1 by robert.schadek — 2024-12-01T16:40:04Z