You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which means that _metadataInit is declared more than once. We cannot simply rename it to _metadataInit##_datatype because _datatype might contain namespaces (::). One option would be to define an additional macro ENVIRE_REGISTER_ITEM(_datatype, _variableName).
Unfortunately I cannot really use this in my use case because at the moment I need ENVIRE_REGISTER_ITEM without the serialization feature because there is no boost serialization for the basetypes that I want to register.
As soon as there is boost serialization functionality for basetypes, I would implement ENVIRE_REGISTER_ITEM(_datatype, _variableName).
But maybe there is a completely different solution to run code once after starting the program that does not rely on some static variable that is defined in the file.
The text was updated successfully, but these errors were encountered:
I open this issue to keep track of the current state of the discussion.
Registering multiple item types in one file is currently not possible, e.g.
The reason is that
ENVIRE_REGISTER_METADATA
expands towhich means that
_metadataInit
is declared more than once. We cannot simply rename it to_metadataInit##_datatype
because_datatype
might contain namespaces (::
). One option would be to define an additional macroENVIRE_REGISTER_ITEM(_datatype, _variableName)
.Unfortunately I cannot really use this in my use case because at the moment I need ENVIRE_REGISTER_ITEM without the serialization feature because there is no boost serialization for the basetypes that I want to register.
My temporary solution for both problems is
As soon as there is boost serialization functionality for basetypes, I would implement
ENVIRE_REGISTER_ITEM(_datatype, _variableName)
.But maybe there is a completely different solution to run code once after starting the program that does not rely on some static variable that is defined in the file.
The text was updated successfully, but these errors were encountered: