https://issues.dlang.org/show_bug.cgi?id=18375
ZombineDev <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #2 from ZombineDev <[email protected]> --- All of these examples should *never* compile. The whole point of `shared` is to statically disallow accidental access shared mutable state. > 90% of all functions in phobos have no business touching `shared`/`__gshared` variables, especially `std.getopt`. `std.getopt` can be safely used to set: * function local variables * (static) thread-local variables * immutable global variables from shared static constructors (not sure if this currently works, but it should be ok from memory model perspective) I consider everything else to potentially trigger undefined behavior. --
