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

Replace macros with associated type, add more descriptive names #9

Merged
merged 4 commits into from
Jun 20, 2024

Conversation

sufferiing
Copy link
Member

@sufferiing sufferiing commented Jun 19, 2024

I have replaced the uses of the TYPENAMES and DIMS macros with an associated type Quantity::Self, as well as gave some of the internal components more descriptive names. This should hopefully be a step towards making the errors generated by this library a bit more comprehensible. In a future PR I will work on adding static_asserts as well.

I also fixed some minor bugs in the units versions of the <math> functions.

@sufferiing sufferiing requested a review from Aang099 June 19, 2024 23:42
Copy link
Member

@Aang099 Aang099 left a comment

Choose a reason for hiding this comment

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

Have you run this with an example program through Godbolt or similar to make sure compiled code behavior is consistent? I don't know specifically why not but C++ has surprised us before.

@sufferiing
Copy link
Member Author

I did now, the compiled code is identical.

@Aang099
Copy link
Member

Aang099 commented Jun 20, 2024

LGTM then

@Aang099 Aang099 self-requested a review June 20, 2024 13:29
@Aang099 Aang099 merged commit 2391a94 into LemLib:main Jun 20, 2024
2 checks passed
@sufferiing sufferiing deleted the error-cleanup branch June 22, 2024 03:55
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