Re: How to list all the manifest constants in a class or struct

2018-06-17 Thread Heromyth via Digitalmars-d-learn
On Sunday, 17 June 2018 at 20:03:09 UTC, aliak wrote: On Sunday, 17 June 2018 at 02:44:38 UTC, Heromyth wrote: [...] I think this bolts.isManifestAssignable [1] will get you partially there. The place where it'll fail though is a static immutable (since they are assignable to manifest

Re: How to list all the manifest constants in a class or struct

2018-06-17 Thread aliak via Digitalmars-d-learn
On Sunday, 17 June 2018 at 02:44:38 UTC, Heromyth wrote: Here is a struct named S: struct S { enum X = 10; enum Y { i = 10 } enum Z = "str"; struct S {} class C {} static int sx = 0; __gshared int gx = 0;

Re: How to list all the manifest constants in a class or struct

2018-06-17 Thread Heromyth via Digitalmars-d-learn
On Sunday, 17 June 2018 at 04:32:29 UTC, Jonathan M Davis wrote: On Sunday, June 17, 2018 02:44:38 Heromyth via Digitalmars-d-learn wrote: Here is a struct named S: struct S { enum X = 10; enum Y { i = 10 } enum Z = "str"; struct S {} class C {} static int sx = 0;

Re: How to list all the manifest constants in a class or struct

2018-06-16 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, June 17, 2018 02:44:38 Heromyth via Digitalmars-d-learn wrote: > Here is a struct named S: > > struct S > { > enum X = 10; > enum Y > { > i = 10 > } > enum Z = "str"; > struct S {} > class C {} > > static int sx = 0; > __gshared int gx = 0; > > shared void

How to list all the manifest constants in a class or struct

2018-06-16 Thread Heromyth via Digitalmars-d-learn
Here is a struct named S: struct S { enum X = 10; enum Y { i = 10 } enum Z = "str"; struct S {} class C {} static int sx = 0; __gshared int gx = 0; shared void g(); } I want list all then the