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

Strong aliases for small typenum numbers like P1, P2, ..., P4 #1

Closed
Logarithmus opened this issue May 29, 2022 · 3 comments
Closed
Labels
enhancement New feature or request

Comments

@Logarithmus
Copy link
Owner

Implement some sort of downcasting facility to shorten compile errors. Now P4 is expanded to PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>. It would be nice to have struct Plus4, which would be converted to PInt<...> for computation & then converted back to another strong alias.

Implementation will likely involve fighting orphan rule & using macros.

@Logarithmus Logarithmus added the enhancement New feature or request label May 29, 2022
@Logarithmus
Copy link
Owner Author

Using const generic approach like here https://docs.rs/nalgebra/latest/nalgebra/base/dimension/struct.Const.html

@Logarithmus
Copy link
Owner Author

Logarithmus commented Jul 18, 2022

Shorten rustc compilation errors for const generics:

@Logarithmus
Copy link
Owner Author

Closed by d0b41ec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant