On 6/22/2017 1:21 AM, Jacob Carlborg wrote:
On 2017-06-21 09:28, Walter Bright wrote:
It does work with C on Windows, Linux, OSX, and FreeBSD, and so it works with
-betterC, too.
For example, in C there's "__thread" and in C++ there's "thread_local".
"__thread" doesn't work with all C++ types because it may contain a non-trivial
default constructor. For C++ types "thread_local" needs to be used which I
believe requires some help from the runtime.
Does D have any of the those problems? I know it doesn't support default
constructors but are there issues with other types, i.e. that would require
support from the D runtime and not just the C runtime?
Static construction is done by the D runtime, and so won't work with -betterC