Skip to content
New issue

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

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

Already on GitHub? # to your account

bounded-collections: Add Const(Int|Uint) for generic const getter support #878

Merged
merged 7 commits into from
Nov 4, 2024

Conversation

conr2d
Copy link
Contributor

@conr2d conr2d commented Oct 24, 2024

Refer to: paritytech/polkadot-sdk#6193

This PR introduces ConstInt and ConstUint to support generic constant integer getter.

Copy link
Member

@ordian ordian left a comment

Choose a reason for hiding this comment

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

Looks reasonable. Could you please update the changelog as well?

@ordian ordian requested a review from bkchr October 24, 2024 14:39
Copy link
Contributor

@gui1117 gui1117 left a comment

Choose a reason for hiding this comment

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

I never thought about asserting const expression like this.

Very nice.

@gui1117
Copy link
Contributor

gui1117 commented Nov 4, 2024

ideally we could ensure the compilation fail with trybuild.
fixed, thank you

Copy link
Member

@bkchr bkchr left a comment

Choose a reason for hiding this comment

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

Nice work! Did not know about this "late const assert evaluation"

@ordian ordian merged commit 31ae234 into paritytech:master Nov 4, 2024
6 checks passed
@conr2d conr2d deleted the const-int branch November 5, 2024 06:34
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants