On Monday, 10 July 2017 at 03:48:17 UTC, FoxyBrown wrote:
static struct S
auto s = &S; // ?!?!?! invalid because S is a struct, but...
basically s = S. So S.x = s.x and s.a = S.a;
Why do I have to do this?
Static has a different meaning for struct. More or less it means
it won't have acces
Thread local struct:
```D
module foobar;
struct Foo {
int x;
}
Foo foo = Foo(8);
void main() {
import std.stdio;
writeln(&foo);
}
```
Global struct:
```D
module foobar;
struct Foo {
int x;
}
__gshared Foo foo = Foo(8);
void main() {
import std.stdio
static struct S
{
public static:
int x;
string a;
}
auto s = &S; // ?!?!?! invalid because S is a struct, but...
basically s = S. So S.x = s.x and s.a = S.a;
Why do I have to do this?
Because in visual D, global structs don't show up in the
debugger. So if I crea