Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Future-proofing for CUnit-derived class sizing #1888

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sprunk
Copy link
Collaborator

@sprunk sprunk commented Jan 10, 2025

Extracted from @saurtron's code and modified a bit.

@sprunk sprunk requested a review from saurtron January 10, 2025 23:47
@@ -7,11 +7,15 @@
#include "Sim/Misc/GlobalConstants.h"
#include "System/MemPoolTypes.h"

/* Size asserted manually in UnitHandler.cpp (to avoid extra #includes here).
* TODO: would be good if this could be found automatically via metaprogramming */
using LargestDerivedFromCUnit = CBuilder;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be the only line that needs changing in the future if a different type becomes larger.

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.

2 participants