-
Notifications
You must be signed in to change notification settings - Fork 62
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
Make elastic_integer
an alias
#284
Comments
I'm not sure I fully understand what you mean here, but it would be very useful for me if I can define a fixed_point<24,0, int32_t>, which does not saturate its underlying type. The elastic integer seems to provide exactly that: promoting to a bigger type only when it is needed. For addition, it only needs one extra integer bit and if and if there are unused digits left, no underlying type promotion is needed. |
The alias version of You can get your fixed-point type currently using |
This appears to be captured/superseded by #864. |
The
NumDigits
incnl::elastic_integer<NumDigits, Integer>
may have been a mistake. Repurpose it aspromote_integer<Integer>
so that, e.g. operator+ doubles the width of the result.New layout:
The text was updated successfully, but these errors were encountered: