Export id generated by becsID #27

Merged
mmcomando merged 1 commit from export_id into master 2022-11-10 10:28:37 +01:00

View file

@ -11,8 +11,11 @@ import std.traits;
*/ */
ref ushort becsID(T)() ref ushort becsID(T)()
{ {
__gshared ushort id = ushort.max; /// Embed id in struct so export can be added to variable definition
return id; static struct LocalStruct {
export __gshared ushort id = ushort.max;
}
return LocalStruct.id;
} }
/************************************************************************************************************************ /************************************************************************************************************************