On Tuesday, 13 September 2022 at 10:59:36 UTC, Dennis wrote:
On Tuesday, 13 September 2022 at 10:45:03 UTC, test123 wrote:
Is there a way to init the __gshared fixed length upb_MiniTable_Enum array ?

I don't think so. You could leave your array typed as `validate_KnownRegex_enum_init_type` and access it through a function that casts it to `upb_MiniTable_Enum`.

Side node, you can use `immutable` instead of `__gshared const`, it amounts to the same for global variables.

I can not do this. because fixed sized array upb_MiniTable_Enum[] is passed into other const object. and upb_MiniTable_Enum can include a lot diff types. (for example mixed diff size upb_MiniTable_Enum)

Reply via email to