Skip to content

Conversation

@TheRedDaemon
Copy link
Contributor

Result of experimentation, since the MACRO approach lacked a test regarding structs.
Short result:

  • If a relatively clean instance definition is wanted, the MACRO approach would require a condition check in both the header and the implementations file. I found no way around that.
  • If templates are used, there are ways to place the instantiation in the header by partial definition of a instance template. This would require boilerplate.
  • This MR uses the latter method to remove the instance-Method approach from the function resolver. While it needs to use another macro, the object construction now seems to happen without any additional side effect.

@TheRedDaemon TheRedDaemon requested a review from gynt December 19, 2025 23:03
@TheRedDaemon TheRedDaemon changed the title [TEMPLATES] Change struct instance approach [TEMPLATES] Change StructResolver instance approach Dec 19, 2025
gynt
gynt previously approved these changes Dec 21, 2025
@TheRedDaemon TheRedDaemon merged commit e620fe1 into main Dec 29, 2025
1 check passed
@TheRedDaemon TheRedDaemon deleted the template-change-struct-instance-approach branch December 30, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants