On Friday, August 17, 2018 9:59:18 AM MDT Steven Schveighoffer via
Digitalmars-d-learn wrote:
> On 8/13/18 9:21 AM, Andrey wrote:
> > On Monday, 13 August 2018 at 11:53:06 UTC, rikki cattermole wrote:
> >> You must use a module constructor to initialize it.
> >
> > Tried this:
> > static this()
>
On 8/13/18 9:21 AM, Andrey wrote:
On Monday, 13 August 2018 at 11:53:06 UTC, rikki cattermole wrote:
You must use a module constructor to initialize it.
Tried this:
static this()
`shared static this()`
normal static this runs on every thread creation, and so cannot modify
immutable data.
On Monday, August 13, 2018 6:14:56 AM MDT Andrey via Digitalmars-d-learn
wrote:
> On Monday, 13 August 2018 at 11:53:06 UTC, rikki cattermole wrote:
> > Unsupported. AA's don't go between CT and RT. You must use a
> > module constructor to initialize it.
>
> Will be supported in future?
Maybe, bu
On Monday, 13 August 2018 at 13:21:45 UTC, Andrey wrote:
On Monday, 13 August 2018 at 11:53:06 UTC, rikki cattermole
wrote:
You must use a module constructor to initialize it.
Tried this:
static this()
{
Test.DESCRIPTION = [Test.Type.One: "One!", Test.Type.Two:
"It's Two...", Test.Type.Th
On Monday, 13 August 2018 at 13:21:45 UTC, Andrey wrote:
On Monday, 13 August 2018 at 11:53:06 UTC, rikki cattermole
wrote:
You must use a module constructor to initialize it.
Tried this:
static this()
{
Test.DESCRIPTION = [Test.Type.One: "One!", Test.Type.Two:
"It's Two...", Test.Type.Th
On Monday, 13 August 2018 at 11:53:06 UTC, rikki cattermole wrote:
You must use a module constructor to initialize it.
Tried this:
static this()
{
Test.DESCRIPTION = [Test.Type.One: "One!", Test.Type.Two:
"It's Two...", Test.Type.Three: "And... Three!"];
}
struct Test
{
// ...
}
I h
On Monday, 13 August 2018 at 11:53:06 UTC, rikki cattermole wrote:
Unsupported. AA's don't go between CT and RT. You must use a
module constructor to initialize it.
Will be supported in future?
On 13/08/2018 11:38 PM, Andrey wrote:
Hello,
I need to declare a static compile-time assoc array inside struct:
struct Test
{
enum Type : ubyte
{
One,
Two,
Three
}
static immutable string[Type] DESCRIPTION = [Ty
Hello,
I need to declare a static compile-time assoc array inside struct:
struct Test
{
enum Type : ubyte
{
One,
Two,
Three
}
static immutable string[Type] DESCRIPTION = [Type.One:
"One!", Type.Two: "It's Two...", Type.T